I was running Debian etch, kernel 2.6.18 , on a computer with a SiS961 based motherboard. The sound was perfect on both analog and SPDIF outputs.

Now I have installed lenny (a fresh install), with kernel 2.6.26 ; I also installed kernel 2.6.20 from backports.org. With either of these, sound is fine on analog output, but spdif is silent. I did ensure that IEC958 is enabled in alsamixer.

Now, spdif playback does work when I do "aplay -D iec958 file.wav" , provided that file.wav is 48000 Hz.

I would like to have the old behaviour - all output on both analog and digital by default. But Igot totally lost in asoundrc even when I wanted to do a simpler thing - have default output to digital only, supporting all formats. I tried putting the following in ~/.asoundrc:

pcm.!default {
    type plug
    slave iec958

but all I got was:

$ aplay stopobiw.wav
ALSA lib pcm.c:6544:(snd_pcm_slave_conf) Invalid slave definition
aplay: main:564: audio open error: Invalid argument

I would very much appreciate any help on writing the proper asoundrc to use iec958 as a default - and ideally, to have both analog and digital at the same time.

Here is the output of amixer, in the parts related to IEC958:

Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined cswitch cswitch-joined
  Playback channels: Mono
  Capture channels: Mono
  Mono: Playback [on] Capture [off]
Simple mixer control 'IEC958 Playback AC97-SPSA',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 3
  Mono: 3 [100%]
Simple mixer control 'IEC958 Playback Source',0
  Capabilities: enum
  Items: 'PCM' 'Analog In' 'IEC958 In'
  Item0: 'PCM'

And here's the output of iecset:

Mode: consumer
Data: audio
Rate: 48000 Hz
Copyright: protected
Emphasis: none
Category: PCM coder
Original: original
Clock: 1000 ppm

Yours, Mikhail Ramendik