Bug 89541 - pacat should set the sample spec channels according to the given channel map
Summary: pacat should set the sample spec channels according to the given channel map
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: tools (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords: love
Depends on:
Blocks:
 
Reported: 2015-03-11 17:18 UTC by Tanu Kaskinen
Modified: 2018-07-30 10:25 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Tanu Kaskinen 2015-03-11 17:18:56 UTC
If the user gives pacat the --channel-map argument but no --channels argument, pacat should adjust the sample spec channels according to the given channel map. Currently pacat complains that the sample spec is incompatible with the channel map, if the given channel map has more or less channels than the default 2.
Comment 1 Raymond 2015-03-12 05:08:57 UTC
what is the purpose of specifiying channel map when usung paplay or parec ?

since pacat does provide any upmix or downmix function

http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/src/utils/pacat.c?id=c3cc14153a2f519b2333400bfa942f70bca58c95

the only way seem to be used for handle center and lfe swap or left /right swap
Comment 2 Raymond 2015-03-13 03:36:02 UTC
do some option such as rate , channel, format only valid for parec ?

as paplay obtain these parameters from the file 

or 

do paplay or parec support pipe similar to 

aplay  |  arecord


arecord | aplay
Comment 3 Tanu Kaskinen 2015-03-17 18:57:27 UTC
paplay can play also raw files, so that's one case where explicit format information is useful. I don't remember if "parec | paplay" is supported (the proper command would be "parec | pacat").
Comment 4 Raymond 2015-03-18 01:11:05 UTC
             "      --rate=SAMPLERATE                 The sample rate in Hz (defaults to 44100)\n"
             "      --format=SAMPLEFORMAT             The sample type, one of s16le, s16be, u8, float32le,\n"
             "                                        float32be, ulaw, alaw, s32le, s32be, s24le, s24be,\n"
             "                                        s24-32le, s24-32be (defaults to s16ne)\n"
             "      --channels=CHANNELS               The number of channels, 1 for mono, 2 for stereo\n"
             "                                        (defaults to 2)\n"
             "      --channel-map=CHANNELMAP          Channel map to use instead of the default\n"
             "      --fix-format                      Take the sample format from the sink/source the stream is\n"
             "                                        being connected to.\n"
             "      --fix-rate                        Take the sampling rate from the sink/source the stream is\n"
             "                                        being connected to.\n"
             "      --fix-channels                    Take the number of channels and the channel map\n"
             "                                        from the sink/source the stream is being connected to.\n"
             "      --no-remix                        Don't upmix or downmix channels.\n"
             "      --no-remap                        Map channels by index instead of name.\n"
   
             "      --raw                             Record/play raw PCM data.\n"


do you mean some options are mutally exclusive ?
Comment 5 Tanu Kaskinen 2015-03-19 06:35:59 UTC
Yes, some are mutually exclusive. It doesn't make sense to specify both --rate and --fix-rate, since both control the same variable.
Comment 6 GitLab Migration User 2018-07-30 10:25:17 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/403.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.