[LINUX/MAC/WIN] Option for different/seperate audio output device for music & videos?
#16
I was wondering about how it might be easier on a user if some of the Audio settings were handled in an automated fashion, specifically the settings of "Audio Output", and "Audio Output Device"

Many users especially new to linux don't understand the complexities of the ALSA sound system (especially when involving pulseaudio). Since pulseaudio doesn't support passthrough, i'm going to leave it out of the discussion. I don't feel that it has a place in the HTPC world anyway.

First off, a concern regarding the setting "Audio Output" which can be either "Analog" or "Digital."

The wiki has this to say about this setting:
http://wiki.xbmc.org/?title=System_Settings Wrote:Allows you to select between Analog and Digital audio output. Note that in order to use digital output, your Xbox needs to be connected to a compatible receiver and a supported AV pack.

Debug Log: http://paste.ubuntu.com/270350/

I have only analog speakers hooked up to my machine and even though I have selected Digital as my output, I still have sound. It seems that this setting isn't really a choice between two methods, but instead a priority of which to try first. In the debug log it tries to do passthrough first, fails, and the loads libfaad for decoding the audio which would then send the sound as analog. Given the setting of Audio Output to Digital, I would expect an error to be presented stating that the audio device that is selected (default stereo analog) does not support digital output.

Because of the way that this setting works (the fall back to analog), I think it can be eliminated entirely if the user had the option to set two audio devices, one for analog, and one for digital.

If no digital device is set, then analog is used all the time, and no passthrough is ever attempted for playing of any audio.

If a digital device is set, then passthrough is attempted, and if it fails then it falls back to analog, and displays a message to the user much like "Failed to in audio device," but instead "Passthrough failed, falling back to analog output device: default"

Second off, a concern regarding the setting "Audio Output Device" which can actually be anything I choose to type.

This setting might possibly be able to be auto populated when XBMC loads, or when this page is loaded and offer the user arrow keys on the right side of the item to cylce through like many other settings in XBMC. I'm sure this can be done in a programmatic way, but here is an example using the aplay command in order to gather what devices are available for use:
Code:
aplay -L|awk -F':' '/.*:/{print $1}'
These are the devices available on my system:
Code:
default
front
surround40
surround41
surround50
surround51
surround71
iec958
hdmi
I think that the user should still be able to type a device because ALSA has support for various plugins and the user may have very specific demands. Of course these very specific demands could be carried out using .asound but that's something else to discuss. There are options on the Event Server settings page which allows the user type, as well has cycle through using the buttons on the right. This is the way that I would see this setting working.

Additionally aplay actually offers descriptions for each of these devices, and describes the card on which they are located:
Code:
default:CARD=Intel
    HDA Intel, STAC92xx Analog
    Default Audio Device
front:CARD=Intel,DEV=0
    HDA Intel, STAC92xx Analog
    Front speakers
surround40:CARD=Intel,DEV=0
    HDA Intel, STAC92xx Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
    HDA Intel, STAC92xx Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
    HDA Intel, STAC92xx Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
    HDA Intel, STAC92xx Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
    HDA Intel, STAC92xx Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Intel,DEV=0
    HDA Intel, STAC92xx Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=Intel,DEV=0
    HDA Intel, INTEL HDMI
    HDMI Audio Output
If this path is chosen for this settings page then it would probably be beneficial for the user to display this information as each device is selected, or possibly not even display the device name (surround51, iec958, etc) to the user at, but instead just the description and card name.

I'm no photoshop whiz so i'll type of what I would see the page looking like
Code:
Downmix multichannel audio to stereo                                   o
Analog Output Device                                  surround51 <down|up>
  Intel - 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
Digital Output Device                                     iec958 <down|up>
  Intel - IEC958 (S/PDIF) Digital Audio Output
  - Dolby Digital capable receiver                                     o
  - DTS capabale reciever                                              o
In making this mock up here it seems that XBMC is kind of already setup for this type of behavior but the settings aren't displayed in such a manner. There is currently an audio output device, and a passthrough output device which would be the Analog and Digital devices that I described above. That leaves the "Audio output" without a purpose.

So in short here are the things that I think would help out new users (and really just about any user):
  • Having two output devices one for Analog and Digital (As there are currently, but aptly named)
  • Automatically populating the Audio devices (Respective of Analog, and Digital)
  • Displaying the description of each audio device below the selected device.
  • Removing the Audio Output setting as the decision to use Digital can be based off of information such as if a digital device is defined, and/or functioning.
Reply
#17
http://trac.xbmc.org/ticket/6878

The problem is that the "devices" you list, aren't devices at all, they're ALSA slaves. This works fine so long as you don't redefine a slave in asoundrc. Once you do the slave is no longer listed in aplay -L, nor any ALSA functions that I could find. I haven't really made much more motion in this area due to the fact that everything is going to change once masteraudio branch gets going again and I don't like doing things twice. I think the diff in that ticket is about as close as I'm willing to take it before MA is closer to ready. There may be a newer version of that kicking around on my notebook somewhere, but there were no changes to functionality as far as the UI is concerned.
Reply
#18
althekiller Wrote:The problem is that the "devices" you list, aren't devices at all, they're ALSA slaves. This works fine so long as you don't redefine a slave in asoundrc. Once you do the slave is no longer listed in aplay -L, nor any ALSA functions that I could find.
I see, I wasn't aware. Well, please keep this in consideration once the MA branch gets focus again. I think this type of setup could be of great advantage to novice users. Since the advanced users are redefining the ALSA devices anyway, it's not like they don't know what they're doing, they understand what they want.

Does what I said about the two output devices, Digital and Analog, make sense?

And what of the Audio Output setting?

Would these also be addressed in the MA branch?
Reply
#19
I think one device field is all that is necessary, however I believe what's available in that list should be better filtered based on which output is chosen.

As far as MA goes, I'm not entirely sure what it's going to look like from a settings standpoint and neither did phi.
Reply
#20
Ok. thanks for the feedback. I'll wait and see how it all pans out. Just trying to look out for the new users who have issues with the ALSA sound cause it's not anything like Windows.

Vista is moving towards having Analog and Digital sound devices separate and being able to select the device desired:
Image
However, unlike Vista, XBMC seems to fall back to the "Audio Output device" if the digital one fails for whatever reason. Maybe it doesn't work the way that I think. From an outsider's perspective it looks to be that way, with the audio output setting on Digital and XBMC using the analog sound card.
Reply
#21
Please see the following trac ticket:
http://trac.xbmc.org/ticket/7167

Image

The audio and passthrough output device have to be entered manually if you would like to change the options. This is unwieldy for people using a remote without a keyboard plus it is subject to easy made spelling errors.

I would like to propose a NFR to change this to a enumerated menu.

Regards,

Dennis
Reply
#22
Another advocate of this idea! Please see my thread here: http://forum.xbmc.org/showthread.php?tid=57871

Posted just a few days ago, I have a couple other ideas of how audio devices are handled and their relation to other options in XBMC.

althekiller posted on there with a ticket that he has worked on with a very similar feature change:
http://trac.xbmc.org/ticket/6878

Looks like the devs call them "spinners"
Reply
#23
The patch has been submitted 5 weeks ago, any idea when this will hit the SVN? Will this be before the 9.10 featurefreeze?
XBMScript - Easy installation for Ubuntu Jaunty Jackalope (9.04)
Installing XBMC on Ubuntu can't get easier than this!
Before posting error/feature questions regarding XBMScript, read THIS
Run as root. Don't be a pussy
Reply
#24
Thanks Maxim! I'll continue from thereon out.

Regards,

Dennis
XBMScript - Easy installation for Ubuntu Jaunty Jackalope (9.04)
Installing XBMC on Ubuntu can't get easier than this!
Before posting error/feature questions regarding XBMScript, read THIS
Run as root. Don't be a pussy
Reply
#25
Any news on this?
XBMScript - Easy installation for Ubuntu Jaunty Jackalope (9.04)
Installing XBMC on Ubuntu can't get easier than this!
Before posting error/feature questions regarding XBMScript, read THIS
Run as root. Don't be a pussy
Reply
#26
althekiller, the trac log says:

Code:
Changed 7 days ago by althekiller

    * attachment alsaspinner.diff added

Sync to current svn + std::string > CStdString
Does this means that its integrated in the linux svn now?
XBMScript - Easy installation for Ubuntu Jaunty Jackalope (9.04)
Installing XBMC on Ubuntu can't get easier than this!
Before posting error/feature questions regarding XBMScript, read THIS
Run as root. Don't be a pussy
Reply
#27
no. stop reading what you want to read.

it is however in svn, but that has nothing to do with that message.
Reply
#28
It's not what I wanted to read, I simply misunderstood. I don't understand how it can be "in" svn but not in the xbmc program code. Forgive my lack of knowledge in subversion, I don't use it for programming.
XBMScript - Easy installation for Ubuntu Jaunty Jackalope (9.04)
Installing XBMC on Ubuntu can't get easier than this!
Before posting error/feature questions regarding XBMScript, read THIS
Run as root. Don't be a pussy
Reply
#29
I have a multizone audio distribution system which only accepts analog cable inputs. Of course when watching movies, my preamp accepts digital. WinXP could output analog & digital at the same time, but when I switched to Win7 a while back I was forced into a AutoHotKey solution (see thread) to change my Windows audio setting to analog or digital (I leave XBMC set to Directsound: Primary Sound Driver).

Obviously I know to hit the hotkey when indicated, and it's not a big deal, but when anyone else uses my system, they often get "Failed to Initialize Audio Device" b/c it's on the wrong setting.

A perfect solution would be in Settings/System/Audio Output separate Audio Output Devices for music or video. Is this something that would be a big deal for the XBMC powers-that-be?
Win10x64 Pro. Intel Core2Duo E8500 3.26GHz on Gigabyte GA-EP43-UD3L. 4GB DDR2 1066MHz RAM. Nvidia GT240 512MB PCIx16. Multiple displays, including Sony VPL-XW5000ES 4k projector + 100" Da-Lite Cinema screen.
Reply
#30
I'd like to be able to configure multiple audio settings and dynamically switch between these configurations depending upon what I am playing in XBMC.

For example for music I'd like to play via the optical toshlink as 7 channel stereo on my receiver (I have the two rear channels go to a splitter box that sends audio to other speakers around the house). However when playing movies I'd like the audio to go via the HDMI for 5.1 or 7.1 surround sound.

Currently I have to choose one setting which compromises the audio quality.
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX/MAC/WIN] Option for different/seperate audio output device for music & videos?1