Sunday, October 26, 2008

Audio - SiS966 (Realtek ALC660-VD) Drama

A strange case appeared recently that might be helpful to someone. I updated ALSA on an SiS966 card and the sound died. Alsamixer was unmuted, etc, proc shows the card as a single unit with a single interrupt:
$ cat /proc/asound/cards
0 [SIS966 ]: HDA-Intel - HDA SIS966
HDA SIS966 at 0xfbfe8000 irq 22

Aplay shows more information about the card.

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: SIS966 [HDA SIS966], device 0: ALC660-VD Analog [ALC660-VD Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: SIS966 [HDA SIS966], device 1: ALC660-VD Digital [ALC660-VD Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
So it appeared hw=0.0 was the analog card, and hw=0,1 was the digital version. If followed that, for the analog portion...
$ cat /proc/asound/card0/pcm0p/info
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: ALC660-VD Analog
name: ALC660-VD Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
....and for the digital portion...
$ cat /proc/asound/card0/pcm1p/info
card: 0
device: 1
subdevice: 0
stream: PLAYBACK
id: ALC660-VD Digital
name: ALC660-VD Digital
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
Why no sound when levels are tested in alsamixer? I took a look at a reliable page alsa-hw that has helped me in the past. From here, I checked to see which of the cards was default:
$ aplay -L
default:CARD=SIS966
HDA SIS966, ALC660-VD Analog
Default Audio Device
front:CARD=SIS966,DEV=0
HDA SIS966, ALC660-VD Analog
Front speakers
surround40:CARD=SIS966,DEV=0
HDA SIS966, ALC660-VD Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=SIS966,DEV=0
HDA SIS966, ALC660-VD Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=SIS966,DEV=0
HDA SIS966, ALC660-VD Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=SIS966,DEV=0
HDA SIS966, ALC660-VD Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=SIS966,DEV=0
HDA SIS966, ALC660-VD Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
null
So it's clear the analog portion of the card is the default. Can we hear anything from the digital portion of the card?
$ aplay -D hw:0,1 alsatest.wav
Playing WAVE 'alsatest.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
No sound here on the digital, what about the analog...
$ aplay -D hw:0,0 alsatest.wav
Playing WAVE 'alsatest.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
...and here I have sound. Apparently the analog portion only will be available.
testing
To check microphone settings, a nice way to check the levels is to open two terminals. Record a couple minutes using arecord in one terminal and use the alsamixer in the other window to vary levels until it works.
$ arecord -d 60 -f cd -t wav -D hw:0,0 foobar.wav
This will record for 60 seconds, but we can change the number of seconds to any value we wish. I call out the changes into the microphone as I make them. To play foobar.wav and check the various settings, we just
$ aplay -D hw:0,0 foobar.wav
After the settings are correct, don't forget
# alsactl store

No comments: