Kodi Community Forum

Full Version: Pulse Audio Auto Switch Profile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to change the audio output from 5.1 to 2.0 stereo whenever a stereo video is playing, but when something other than stereo is playing, change back to 5.1.

I have a stereo which handles stereo better than XBMC up converting to 5.1.

Setting profiles are as follows:
1. 2.0 audio.
pactl set-card-profile alsa_card.pci-0000_00_03.0 output:hdmi-stereo-extra1
2. Anything above.
pactl set-card-profile alsa_card.pci-0000_00_03.0 output:hdmi-surround-extra1

I'm sure there's got to be some way to script this so before it plays, I get called and I can run that command accordingly. I'm a programmer, so if there is a way to program, I can do so.

Thanks,
Mr. Gecko
See: http://freedesktop.org/software/pulseaud...ource.html especially check the prop list you can query and the the set-profile that you could do.
(2014-03-16, 07:06)grmrgecko Wrote: [ -> ]I want to change the audio output from 5.1 to 2.0 stereo whenever a stereo video is playing, but when something other than stereo is playing, change back to 5.1.

I have a stereo which handles stereo better than XBMC up converting to 5.1.

Setting profiles are as follows:
1. 2.0 audio.
pactl set-card-profile alsa_card.pci-0000_00_03.0 output:hdmi-stereo-extra1
2. Anything above.
pactl set-card-profile alsa_card.pci-0000_00_03.0 output:hdmi-surround-extra1

I'm sure there's got to be some way to script this so before it plays, I get called and I can run that command accordingly. I'm a programmer, so if there is a way to program, I can do so.

Thanks,
Mr. Gecko

don't up convert then!
That's not the issue. Pulse is opening 5.1 channels, only 2 of them have "audio" in them. When this is done the AVR tells "Multi-In" and you loose the capabilities of e.g. Dolby Upmix on the AVR. That needs to be implemented in the sink, e.g. using 2.0 profile when there is 2.0 and 5.1 profile (if available) if it's 5.1

So I see the issue of the first poster quite well. I don't plan to integrate that into gotham, cause it's plain too late to mess with the profiles in the sink.
(2014-03-16, 09:39)fritsch Wrote: [ -> ]That's not the issue. Pulse is opening 5.1 channels, only 2 of them have "audio" in them. When this is done the AVR tells "Multi-In" and you loose the capabilities of e.g. Dolby Upmix on the AVR. That needs to be implemented in the sink, e.g. using 2.0 profile when there is 2.0 and 5.1 profile (if available) if it's 5.1

So I see the issue of the first poster quite well. I don't plan to integrate that into gotham, cause it's plain too late to mess with the profiles in the sink.

You seem to understand my issue. My AVR is a Yamaha receiver which has modes to simulate surround sound by taking main sources, voices, and placing them in the front while every other sound may be distributed to all speakers. Sometimes I do not want that, and I can just change it to 2 channels with the stereo.

So what I'm understanding that you're saying is that XBMC may have this feature in the future, but not anytime soon. If that's the case, I will just write a bash script to change profiles and run it ever time I encounter the two audio types.

It seems like you said in your first post to script XBMC to do this right, I'll have to modify the code myself to add it in. As in, there is no way to script it other wise.

I may very well add it in myself, when I find time.

Thanks for your reply,
Mr. Gecko