Skip to contentSkip to conversation

SIS7012 SPDIF support

DISCUSSION James Courtier-Dutton 4 participants 13 messages Jun 2, 2003 – Jun 7, 2003

lore
Share & tools
lore
#0 lore raw

Is the SPDIF output of the SIS7012 (i810 with ac97) supported in alsa. If so, how does one enable the SPDIF out.
The current kernel OSS module supports it.

Cheers
James

-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5

#1 lore raw
Quoted 3 lines · James Courtier-Dutton

Is the SPDIF output of the SIS7012 (i810 with ac97) supported in alsa. If so, how does one enable the SPDIF out.
The current kernel OSS module supports it.

Look for IEC958 controls.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5

#2 lore raw
In reply to James Courtier-Dutton

At Mon, 02 Jun 2003 17:01:42 +0100,

Quoted 4 lines · James Courtier-Dutton

Is the SPDIF output of the SIS7012 (i810 with ac97) supported in alsa. If so, how does one enable the SPDIF out.
The current kernel OSS module supports it.

which OSS (kernel) version supports spdif out on this chip? i'd like to take a look.

ciao,

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5

#3 lore raw
Quoted 8 lines · Takashi Iwai

At Mon, 02 Jun 2003 17:01:42 +0100,

Quoted 3 lines · James Courtier-Dutton

Is the SPDIF output of the SIS7012 (i810 with ac97) supported in alsa. If so, how does one enable the SPDIF out.
The current kernel OSS module supports it.

Quoted 9 lines

which OSS (kernel) version supports spdif out on this chip? i'd like to take a look.

ciao,

Takashi

The user I was talking to on irc had kernel 2.4.21-ac-rc1 or something like that. I have root access to his box if you need any more info. linux-2.4.21-rc1.tar.bz2

I attach the source files that I think you need.
Cheers
James

#4 lore raw

At Tue, 03 Jun 2003 12:24:03 +0100,

Quoted 19 lines · James Courtier-Dutton
Quoted 8 lines · Takashi Iwai

At Mon, 02 Jun 2003 17:01:42 +0100,

Quoted 3 lines · James Courtier-Dutton

Is the SPDIF output of the SIS7012 (i810 with ac97) supported in alsa. If so, how does one enable the SPDIF out.
The current kernel OSS module supports it.

Quoted 9 lines

which OSS (kernel) version supports spdif out on this chip? i'd like to take a look.

ciao,

Takashi

Quoted 6 lines

The user I was talking to on irc had kernel 2.4.21-ac-rc1 or something like that.
I have root access to his box if you need any more info. linux-2.4.21-rc1.tar.bz2

I attach the source files that I think you need.

thanks. looking at the codes, it seems that no special handling for
the chip. it simply sets up the ac97 registers.

the patch below is a quick hack to set the spdif rate on the first playback pcm device. in addition, you'll need to set up the following mixer controls:

- 'IEC958 AC97-SPSA' to 0 (slots 3/4).
- 'IEC958 Playback Switch' to on.

you might need to set up 'IEC958 Playback Default', too, but it might not... try once the above two switches at first.

Takashi

#8 lore raw

build changes

In reply to Takashi Iwai

In v0.9.4 Rules.make changed. I used to put the files of my driver in the alsa-driver-xxx/pci directory, but they don't compile anymore:

bash-2.05$ make
Coping file alsa-kernel/core/pci/echoaudio.c
cp: cannot stat `/home/pochini/soft/alsa-driver-0.9.4/alsa-kernel/pci/echoaudio.c': No such file or directory
make: *** [echoaudio.c] Error 1
bash-2.05$

I tried to replace Rules.make with an older version and it works fine. How do I compile the driver for 0.9.4+ ? I also would like to group all files in a subdir.

Bye.

-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com.

#9 lore raw

Re: build changes

Quoted 10 lines · Giuliano Pochini

In v0.9.4 Rules.make changed. I used to put the files of my driver in the alsa-driver-xxx/pci directory, but they don't compile anymore:

bash-2.05$ make
Coping file alsa-kernel/core/pci/echoaudio.c
cp: cannot stat `/home/pochini/soft/alsa-driver-0.9.4/alsa-kernel/pci/echoaudio.c': No such file or directory
make: *** [echoaudio.c] Error 1
bash-2.05$

Quoted 3 lines

I tried to replace Rules.make with an older version and it works fine. How do I compile the driver for 0.9.4+ ? I also would like to group all files in a subdir.

Do you have a file alsa-driver/pci/echoaudio.patch?

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com.

#10 lore raw

Re: build changes

Quoted 5 lines · On 04-Jun-2003 Jaroslav Kysela wrote:
Quoted 3 lines

I tried to replace Rules.make with an older version and it works fine. How do I compile the driver for 0.9.4+ ? I also would like to group all files in a subdir.

Do you have a file alsa-driver/pci/echoaudio.patch?

Yes... I removed it and now it compiles the main source, but it stops here:

make: *** No rule to make target echoaudiogeneric/CDaffyDuck.c', needed by echoaudiogeneric/CDaffyDuck.o'. Stop.

The Makefile contains this line:

snd-echoaudio-objs := echoaudio.o echoaudiogeneric/OsSupportLinux.o [...]

all .cpp sources in echoaudiogeneric/ have already been compiled. It shouldn't try to compile them again since object files are up to date.

Bye.

-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com.

#11 lore raw

Re: build changes

At Wed, 04 Jun 2003 17:57:32 +0200 (CEST),

Quoted 11 lines · Giuliano Pochini
Quoted 5 lines · On 04-Jun-2003 Jaroslav Kysela wrote:
Quoted 3 lines

I tried to replace Rules.make with an older version and it works fine. How do I compile the driver for 0.9.4+ ? I also would like to group all files in a subdir.

Do you have a file alsa-driver/pci/echoaudio.patch?

Yes... I removed it and now it compiles the main source, but it stops here:

Quoted 8 lines

make: *** No rule to make target echoaudiogeneric/CDaffyDuck.c', needed by echoaudiogeneric/CDaffyDuck.o'. Stop.

The Makefile contains this line:

snd-echoaudio-objs := echoaudio.o echoaudiogeneric/OsSupportLinux.o [...]

all .cpp sources in echoaudiogeneric/ have already been compiled. It shouldn't try to compile them again since object files are up to date.

wouldn't it better to put another Makefile in sub directories?

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com.

#5 lore raw
In reply to Takashi Iwai
Quoted 9 lines · Takashi Iwai

thanks. looking at the codes, it seems that no special handling for
the chip. it simply sets up the ac97 registers.

the patch below is a quick hack to set the spdif rate on the first playback pcm device. in addition, you'll need to set up the following mixer controls:

Quoted 8 lines

- 'IEC958 AC97-SPSA' to 0 (slots 3/4).
- 'IEC958 Playback Switch' to on.

you might need to set up 'IEC958 Playback Default', too, but it might not... try once the above two switches at first.

Takashi

I have done some further investigation, and have discovered the type of ac97 chip used. I attach output from the ac97#0regs /proc/asound/card0 file.
Here is the url to download datasheets of the chip.
It is an ALC650 Chip.
http://www.realtek.com.tw/downloads/downloads1-3.aspx?lineid=5&famid=All&series=8&refdesign=True

From my analysis, I think that we should be setting bit 2 of register 0x2a to get SPDIF out.
Is it possible to set this via alsamixer, or do I now have to open the device with a particular name, e.g. iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2

The chip can set non-audio bits etc, so we should really be able to support opening with the iec958:...etc. name.

If you think I am on the right lines here, then what functions do we have to add to get it to parse iec958 lines correctly.

Cheers
James

0:00 = 5980
0:02 = 9f1f
0:04 = 0000
0:06 = 801f
0:08 = 0000
0:0a = 801e
0:0c = 801f
0:0e = 801f
0:10 = 9f1f
0:12 = 9f1f
0:14 = 9f1f
0:16 = 9f1f
0:18 = 9f1f
0:1a = 0000
0:1c = 0000
0:1e = 0000
0:20 = 0000
0:22 = 0000
0:24 = 0000
0:26 = 000f
0:28 = 05c7
0:2a = 05c1
0:2c = bb80
0:2e = bb80
0:30 = bb80
0:32 = bb80
0:34 = 0000
0:36 = 9f80
0:38 = 9f9f
0:3a = 2000
0:3c = 0000
0:3e = 0000
0:40 = 0000
0:42 = 0000
0:44 = 0000
0:46 = 0000
0:48 = 0000
0:4a = 0000
0:4c = 0000
0:4e = 0000
0:50 = 0000
0:52 = 0000
0:54 = 0000
0:56 = 0000
0:58 = 0000
0:5a = 0000
0:5c = 0000
0:5e = 0000
0:60 = 0000
0:62 = 0000
0:64 = 0808
0:66 = 0808
0:68 = 0000
0:6a = 0000
0:6c = 0000
0:6e = 0014
0:70 = 0211
0:72 = 00a0
0:74 = 0043
0:76 = 0001
0:78 = 0102
0:7a = 57c6
0:7c = 414c
0:7e = 4720

#6 lore raw

At Fri, 06 Jun 2003 02:20:05 +0100,

Quoted 18 lines · James Courtier-Dutton
Quoted 16 lines · Takashi Iwai

thanks. looking at the codes, it seems that no special handling for
the chip. it simply sets up the ac97 registers.

the patch below is a quick hack to set the spdif rate on the first playback pcm device. in addition, you'll need to set up the following mixer controls:

- 'IEC958 AC97-SPSA' to 0 (slots 3/4).
- 'IEC958 Playback Switch' to on.

you might need to set up 'IEC958 Playback Default', too, but it might not... try once the above two switches at first.

Quoted 8 lines
Quoted 1 line

Takashi

I have done some further investigation, and have discovered the type of ac97 chip used.
I attach output from the ac97#0regs /proc/asound/card0 file. Here is the url to download datasheets of the chip.
It is an ALC650 Chip.
http://www.realtek.com.tw/downloads/downloads1-3.aspx?lineid=5&famid=All&series=8&refdesign=True

oops, it seems like my mistake in the last change.

could you try the attached patch?

Takashi

#7 lore raw
Quoted 8 lines · Takashi Iwai

oops, it seems like my mistake in the last change.

could you try the attached patch?

Takashi

That seems to have helped. We now get sliders.
We now get ac3 and dts sound with device name
iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2
and pcm with device name
iec958:AES0=0x4,AES1=0x82,AES2=0x0,AES3=0x2

We currently get no sound with device name: -
default
front

We only have the spdif connected.
So if sound is comming out of the analogue port, we will not know about it.

It would be nice to get sound output with default and front, because then oss emulation and alsa's automatic resampling would also work.

The problem with the device is that if you want a 48000hz spdif out, all inputs have to also be 48000hz. So, if we open the device for 44100 hz output, it would be nice if the spdif automatically changed to 44100 hz as well. Currently, sound only seems to work if you send it to the device at 48000 hz. E.g. DVDs audio tracks.

Cheers
James

-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com.

#12 lore raw

Re: build changes

In reply to Takashi Iwai
Quoted 3 lines · Takashi Iwai

At Wed, 04 Jun 2003 17:57:32 +0200 (CEST),

wouldn't it better to put another Makefile in sub directories?

Sure. I followed the instrutions you wrote here a couple of months ago. When I do cvscompile --with-cards=powermac,echoaudio[...] it stops here:

make -C echoaudio fastdep
make[2]: Entering directory /home/Giu/tttttt/alsa-driver-0.9.4/pci/echoaudio' /home/Giu/tttttt/alsa-driver-0.9.4/include/sndversions.h was not updated make[2]: *** No rule to make target GenericDriver/OsSupportLinux.c', needed by `fastdep'. Stop.
make[2]: Leaving directory `/home/Giu/tttttt/alsa-driver-0.9.4/pci/echoaudio'
make[1]: *** [_sfdep_echoaudio] Error 2
make[1]: Leaving directory `/home/Giu/tttttt/alsa-driver-0.9.4/pci'
make: *** [dep] Error 1

But any subsequent "make" completes successfully.

These are the changes I did to the various files:

pci/Makefile

-extra-subdir-y := pdplus
+extra-subdir-y := pdplus echoaudio

utils/Modules.dep

+%dir linux/sound/pci/echoaudio
+|snd-echoaudio snd-pcm

acore/Makefile

+obj-$(CONFIG_SND_ECHOAUDIO) += snd-pcm.o snd-page-alloc.o snd.o snd-rawmidi.o

Bye.

-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com.