You are not logged in.

#1 2009-12-05 21:43:36

rokkon
Member
Registered: 2007-04-08
Posts: 18

S/PDIF (IEC958) Volume Control with ALSA

I recently managed to get the S/PDIF output of my onboard soundchip (Realtek ALC655 rev 0) to work with mpd, i.e. i can hear sound over my external amplifier connected via an coax cable. For doing so i put this in my mpd.conf:

audio_output {
    type        "alsa"
    name        "My ALSA Device"
    device        "hw:0,2"    # optional
    format        "44100:16:2"    # optional
    mixer_device    "default"    # optional
    mixer_control    "Master"    # optional
    auto_resample        "no"
    use_mmap         "yes"
}

hw:0,2 is the IEC958 device of the soundchip (hw:0,0 is the analog output)

Now for the problem: I can't control the volume through alsamixer anymore, none of the elements work, neither "Master", "PCM" nor anything else. The only thing that works is using the software mixer, which i find quite uncomfortable because i want to control the global volume via xfce4-mixer in the tray.

Google didn't helped me this time so i appreciate any help here...

Thanks in advance!

Last edited by rokkon (2009-12-05 21:47:08)

Offline

#2 2009-12-08 15:30:02

snakebite
Member
From: Norway
Registered: 2009-05-13
Posts: 42

Re: S/PDIF (IEC958) Volume Control with ALSA

If you enable S/PDIF output in alsamixer and use the default device (hw:0,0) you should be able to hear sound from your S/PDIF output while controlling volume with PCM. That works for me at least, but I usually use iec958 as the output device and control the volume on my home stereo (which is a better solution IMO). Also, when using iec958 you can skip the format line if your amplifier supports different formats to avoid having to resample the audio.

Offline

#3 2009-12-08 18:00:25

rokkon
Member
Registered: 2007-04-08
Posts: 18

Re: S/PDIF (IEC958) Volume Control with ALSA

First off, thanks for the answer.
I did actually try to use S/PDIF out via (hw:0,0) which unfortunately didn't work for me. It seems the only way it works is by using (hw:0,2). Maybe that's just my onboard chip.
I guess it's just not possible to change volume with alsa when using that config so i have to control it through my amp as well. Although that's not my prefered method i will have to live with it. hmm

The original intention of the "format" line was to stop alsa resampling as i mostly listen to 44.1 kHz mp3s. I already removed it though because i realized that it's usesless as my sound chip only supports 48 kHz. Thanks for the hint anyway.

Offline

Board footer

Powered by FluxBB