On 01/12/2014 02:30 PM, Takashi Sakamoto wrote: > Hi David, > >> AFAIK, the driver should support what the hardware supports. > > Yes. It's my intent to add the rules between channels/rates. > > Well, today I did some tests for an idea to use 'plug' plugin. > >> 1) Edit /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf >> and change "hw:%f" to "plughw:%f" in the section >> "Mapping analog-stereo". If the plughw plugin can upscale, >> then that should make things work. > > This wasn't good. Then I remembered this fact: > >> Hm. Actually PulseAudio tries opening "plug:hw:1" too and setting the >> channel number to two fails in that case too. If the "plug" plugin can >> change the number of channels, then that should have been working. > > Then I debug PulseAudio/libasound in a point of 'how to open ALSA PCM > handle'. I have an presumption that 'plug' plugin can upscale channels > correctly if PulseAudio open 'plug:hw' device as the same way as > normal-aplay open. > > As a result, I got a conviction that 'SND_PCM_NO_AUTO_CHANNELS' flag for > snd_pcm_open() disables upscaling. Ah. I forgot that PulseAudio uses this flag, sorry. I don't think we can remove it either, because I'm afraid that will lead to simple headsets suddenly supporting 7.1 surround profiles, because plug will just downscale to 2 channels... As for the pcm.front approach, I agree with you that it's not reasonable for you to maintain 80 - 100 different files (one for each device). Also it would mean 100 more files on every machine out there... Just brainstorming here, one option could perhaps be to improve alsa-lib to have one flag SND_PCM_NO_AUTO_CHANNELS_UP and another SND_PCM_NO_AUTO_CHANNELS_DOWN, to allow upscaling but not downscaling. Another alsa-lib option could be to improve the route plugin (which ignores SND_PCM_NO_AUTO_CHANNELS) to be able to autodetect the number of channels the hw supports (like the plug plugin does today). Then one pcm.front file would be enough for all firewire devices. Both these require some alsa-lib coding, so another option is still to write a separate PulseAudio profile. :-) -- David Henningsson, Canonical Ltd. https://launchpad.net/~diwic