Automatically switch profiles depeding on the number of input-channels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'Twas brillig, and Frederik Vogelsang at 01/08/11 13:38 did gyre and gimble:
> Hi,
> 
> I'd like to know how I can dynamically switch between profiles
> depending on the number of audio channels of the file being played.
> 
> My output-sink currently has two profiles:
> * Digital Stereo Output
> * 5.1 AC3 Output
> 
> Now I'd like to use the Stereo Output for normal PCM sources and the
> 5.1 Output for multichannel sources. Is there a way to do that with
> PulseAudio?
> 
> With pure ALSA this can be done easily with the definition of a
> "pcm.!surround51"-device in the .asoundrc, but I'd like to use
> PulseAudio for obvious reasons.

Dynamic profile switching is not currently supported, but it will be in
the future.

At present we're concentrating on passthough as that's generally what
people have asked for more and it it semi related to this issue.

If we add passthrough into the mix we may have the following list of
preferences:


1. Media Player requests DTS passthrough -> PA Accepts as the user has
said their receiver supports it and we are using the Digital Stereo
Output profile.

2. Media Player requests DTS passthrough -> PA Rejects as the user has
not said their receiver supports it.
 Media Player requests AC3 passthrough -> Ditto
 Media Player requests 6 channel PCM surround -> PA Switches to the AC3
Profile and accepts 6ch PCM input.


As you can see the negotiation becomes far more complex... in step three
above, why would PA prefer the 5.1 AC3 over the 5.1 Analog for example?

To be honest there are a heap of problems surrounding this logic just
now, which also focuses on jack detection.

I can't really comment more on the issues as they are broad and
complicated, but we'll all be meeting up at the Desktop Summit in a
couple weeks, so we'll be taking issues like this forward a little then,
and hopefully come up with coherent plans to deal with this kind of thing!

At the moment, I'm not massively in favour of doing automatic profile
switching at all and rather just dealing more gracefully with the
disabling of upmixing. The AC3 encoder output is a bit of a stick in the
mud here tho', as it's got a kind special use case... I'm not really
sure how best to deal with that one :s

Col



-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux