S/PDIF out for both analog and digital audio

I had an issue when switching from analog to digital audio using my s/pdif ouput device: “failed to initialize audio settings”. The issues can be solved with the following script ~/.asoundrc:

pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,1"
period_time 0
period_size 1024
buffer_size 8192
rate 48000
}
bindings {
0 0
1 1
}
}

The script bypasses PulseAudio and forces XBMC to directly use ALSA, which will solve the “failed to initialize audio settings” error. XBMC has to be configured with these sound settings:

AUDIO OUTPUT DEVICE: custom
CUSTOM AUDIO DEVICE: plug:dmixer
PASSTHROUGH AUDIO DEVICE: iec958

De bovenstaande oplossing zou het probleem van “failed to initialize audio settings” moeten oplossen.

Comments

  1. iGadget says:

    Euh… wat moet ik mij voorstellen bij *analoog* geluid over een S/PDIF uitgang? S/PDIF is òf optisch òf coaxiaal digitaal (vandaar de ‘D’ S/PDIF) geluid. Het enige analoge wat ik daar -in theorie- overheen zie gaan is een mono signaal via een coaxiale verbinding. Maar het kan aan mij liggen natuurlijk :-)

  2. Josu says:

    Hello, I try this config on v8 XBMCFreak but it does not work for me. I don’t have any .asoundrc file, so I creat it.

    I have no analog audio on my HTPC with this config, this is my device list:

    $ aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: NVidia [HDA NVidia], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 0: NVidia [HDA NVidia], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
    Subdevices: 0/1
    Subdevice #0: subdevice #0
    card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
    Subdevices: 1/1
    Subdevice #0: subdevice #0

    Thanks for all!

  3. Anik says:

    This didn’t work for me on XBMC Live – what I wanted is a way to do simultaneous audio output to both the HDMI port (so it would play through the TV) and through the analog audio output (so I could play audio files without needing to have the TV on). What I got was system sounds only playing through the analog output, and no audio at all from other source material (it may have been trying to play via the optical port, but since my 5.1 receiver is broken I cannot test that – either way it didn’t play through the analog output).

Leave a Comment

*