Skip to contentSkip to conversation

optical SPDIF output on Abit NF7 nforce2 main board.

DISCUSSION Carsten Koch 4 participants 22 messages Sep 1, 2003 – Sep 28, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

I have an Abit NF7 nforce2 main board, which has an optical SPDIF output controlled by the on-board sound.

With nvida's "nvsound" driver, the optical output works.

With alsa, I have been unable to get any sound out of it so far. I tried the alsa-0.9.0.cvs20030217-23 alsa drivers that came with my SuSE 8.2 system, the release 0.9.6 drivers and last Friday's CVS.

lspci reports the device as:

00:06.0 Multimedia audio controller: nVidia Corporation nForce2 AC97 Audio Controler (MCP) (rev a1)
Subsystem: ABIT Computer Corp.: Unknown device 1c02
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0 (500ns min, 1250ns max)
Interrupt: pin A routed to IRQ 5
Region 0: I/O ports at d800 [size=256]
Region 1: I/O ports at dc00 [size=128]
Region 2: Memory at ef001000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [44] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

Alsamixer says "Card: NVidia nForce2", "Chip: Realtek ALC650 rev 3" and offers these four IEC958 items: "Item: IEC958" (on/off), "Item: IEC958 Input Monitor" (on/off), "Item: IEC958 Playback AC97-SPSA" (3 level control), "Analog to IEC958 Output" (on/off).

I was expecting that "Item: IEC958" would turn the optical SPDIF output on/off, but the light is always on and the sound is always off, no matter how I set that switch.

I was also expecting that "Item: IEC958 Input Monitor" would route the SPDIF sound from my DVB card (whose output I have connected to the SPDIF input on the main board) to the optical SPDIF output when I set that switch to on, but again toggling that switch does nothing: the light is always on and the sound is always off.

Is there anything I overlooked or does SPDIF output simply not work with this driver?

Here is my lsmod output:

Module Size Used by Tainted: P

dvb-ttpci             302512   7
evdev                   4192   0  (unused)
input                   3264   0  [dvb-ttpci evdev]
ves1820                 3900   0
stv0299                 7188   1
grundig_29504-491       3620   0
grundig_29504-401       3820   0
alps_tdlb7              4336   0
alps_tdmb7              4008   0
alps_bsrv2              3932   2
dvb-core               39832  43  [dvb-ttpci ves1820 stv0299 grundig_29504-491 grundig_29504-401 alps_tdlb7 alps_tdmb7 alps_bsrv2]
videodev                6176   2  [dvb-ttpci]
lirc_serial             7680   1  (autoclean)
nvidia               1628576  11  (autoclean)
nfsd                   84144   4  (autoclean)
ipv6                  145108  -1  (autoclean)
snd-intel8x0           21924   0
snd-pcm                74116   0  [snd-intel8x0]
snd-timer              17724   0  [snd-pcm]
snd-ac97-codec         44920   0  [snd-intel8x0]
snd-page-alloc          7316   0  [snd-intel8x0 snd-pcm]
snd-mpu401-uart         4192   0  [snd-intel8x0]
snd-rawmidi            16096   0  [snd-mpu401-uart]
snd-seq-device          4816   0  [snd-rawmidi]
snd                    40164   0  [snd-intel8x0 snd-pcm snd-timer snd-ac97-codec snd-mpu401-uart snd-rawmidi snd-seq-device]
soundcore               3748   0  [snd]
nvnet                  26240   1
xfs                   575738   4

Any ideas what else I could try?

Many thanks in advance for your help!

Carsten.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#1 lore raw

At Mon, 01 Sep 2003 13:28:30 +0200,

Quoted 27 lines · Carsten Koch

Hi,

I have an Abit NF7 nforce2 main board, which has an optical SPDIF output controlled by the on-board sound.

With nvida's "nvsound" driver, the optical output works.

With alsa, I have been unable to get any sound out of it so far. I tried the alsa-0.9.0.cvs20030217-23 alsa drivers that came with my SuSE 8.2 system, the release 0.9.6 drivers and last Friday's CVS.

lspci reports the device as:

00:06.0 Multimedia audio controller: nVidia Corporation nForce2 AC97 Audio Controler (MCP) (rev a1)
Subsystem: ABIT Computer Corp.: Unknown device 1c02
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0 (500ns min, 1250ns max)
Interrupt: pin A routed to IRQ 5
Region 0: I/O ports at d800 [size=256]
Region 1: I/O ports at dc00 [size=128]
Region 2: Memory at ef001000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [44] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

Quoted 7 lines

Alsamixer says "Card: NVidia nForce2", "Chip: Realtek ALC650 rev 3" and offers these four IEC958 items: "Item: IEC958" (on/off), "Item: IEC958 Input Monitor" (on/off), "Item: IEC958 Playback AC97-SPSA" (3 level control), "Analog to IEC958 Output" (on/off).

I was expecting that "Item: IEC958" would turn the optical SPDIF output on/off, but the light is always on and the sound is always off, no matter how I set that switch.

how did you test spdif out? you need to choose the PCM "spdif" (aka "iec958") for the proper output over SPDIF.

Quoted 5 lines

I was also expecting that "Item: IEC958 Input Monitor" would route the SPDIF sound from my DVB card (whose output I have connected to the SPDIF input on the main board) to the optical SPDIF output when I set that switch to on, but again toggling that switch does nothing: the light is always on and the sound is always off.

spdif input on ALC650 didn't work until this morning. i applied the patch from James to cvs, so now it should work (as long as sf's anon-cvs repository is properly mirrored).

Takashi

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#2 lore raw
Quoted 49 lines · Takashi Iwai

At Mon, 01 Sep 2003 13:28:30 +0200,

Quoted 26 lines · Carsten Koch

Hi,

I have an Abit NF7 nforce2 main board, which has an optical SPDIF output controlled by the on-board sound.

With nvida's "nvsound" driver, the optical output works.

With alsa, I have been unable to get any sound out of it so far. I tried the alsa-0.9.0.cvs20030217-23 alsa drivers that came with my SuSE 8.2 system, the release 0.9.6 drivers and last Friday's CVS.

lspci reports the device as:

00:06.0 Multimedia audio controller: nVidia Corporation nForce2 AC97 Audio Controler (MCP) (rev a1)
Subsystem: ABIT Computer Corp.: Unknown device 1c02
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0 (500ns min, 1250ns max)
Interrupt: pin A routed to IRQ 5
Region 0: I/O ports at d800 [size=256]
Region 1: I/O ports at dc00 [size=128]
Region 2: Memory at ef001000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [44] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

Quoted 7 lines

Alsamixer says "Card: NVidia nForce2", "Chip: Realtek ALC650 rev 3" and offers these four IEC958 items: "Item: IEC958" (on/off), "Item: IEC958 Input Monitor" (on/off), "Item: IEC958 Playback AC97-SPSA" (3 level control), "Analog to IEC958 Output" (on/off).

I was expecting that "Item: IEC958" would turn the optical SPDIF output on/off, but the light is always on and the sound is always off, no matter how I set that switch.

how did you test spdif out? you need to choose the PCM "spdif" (aka "iec958") for the proper output over SPDIF.

Quoted 5 lines

I was also expecting that "Item: IEC958 Input Monitor" would route the SPDIF sound from my DVB card (whose output I have connected to the SPDIF input on the main board) to the optical SPDIF output when I set that switch to on, but again toggling that switch does nothing: the light is always on and the sound is always off.

Quoted 8 lines

spdif input on ALC650 didn't work until this morning. i applied the patch from James to cvs, so now it should work (as long as sf's anon-cvs repository is properly mirrored).

Takashi

Also, do NOT use alsamixer to test this. I have found that alsamixergui works ok.
alsamixer has some bugs, e.g. Muting the IEC958 output actually enables output, and un-muting disables output, but alsamixergui gets everything right. Also, alsamixer cannot handle all the different toggle switches correctly.

Cheers
James

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#3 lore raw

At Mon, 01 Sep 2003 14:42:56 +0100,

Quoted 56 lines · James Courtier-Dutton
Quoted 54 lines · Takashi Iwai

At Mon, 01 Sep 2003 13:28:30 +0200,

Quoted 26 lines · Carsten Koch

Hi,

I have an Abit NF7 nforce2 main board, which has an optical SPDIF output controlled by the on-board sound.

With nvida's "nvsound" driver, the optical output works.

With alsa, I have been unable to get any sound out of it so far. I tried the alsa-0.9.0.cvs20030217-23 alsa drivers that came with my SuSE 8.2 system, the release 0.9.6 drivers and last Friday's CVS.

lspci reports the device as:

00:06.0 Multimedia audio controller: nVidia Corporation nForce2 AC97 Audio Controler (MCP) (rev a1)
Subsystem: ABIT Computer Corp.: Unknown device 1c02
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0 (500ns min, 1250ns max)
Interrupt: pin A routed to IRQ 5
Region 0: I/O ports at d800 [size=256]
Region 1: I/O ports at dc00 [size=128]
Region 2: Memory at ef001000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [44] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

Quoted 7 lines

Alsamixer says "Card: NVidia nForce2", "Chip: Realtek ALC650 rev 3" and offers these four IEC958 items: "Item: IEC958" (on/off), "Item: IEC958 Input Monitor" (on/off), "Item: IEC958 Playback AC97-SPSA" (3 level control), "Analog to IEC958 Output" (on/off).

I was expecting that "Item: IEC958" would turn the optical SPDIF output on/off, but the light is always on and the sound is always off, no matter how I set that switch.

how did you test spdif out? you need to choose the PCM "spdif" (aka "iec958") for the proper output over SPDIF.

Quoted 5 lines

I was also expecting that "Item: IEC958 Input Monitor" would route the SPDIF sound from my DVB card (whose output I have connected to the SPDIF input on the main board) to the optical SPDIF output when I set that switch to on, but again toggling that switch does nothing: the light is always on and the sound is always off.

spdif input on ALC650 didn't work until this morning. i applied the patch from James to cvs, so now it should work (as long as sf's anon-cvs repository is properly mirrored).

Quoted 8 lines
Quoted 3 lines

Takashi

Also, do NOT use alsamixer to test this. I have found that alsamixergui works ok.
alsamixer has some bugs, e.g. Muting the IEC958 output actually enables output, and un-muting disables output, but alsamixergui gets everything right.

hm, it's interesting.
do you mean "muting" as the state with 'MM' on the top of level bar?

Quoted 1 line

Also, alsamixer cannot handle all the different toggle switches correctly.

could you elaborate this problem?
this then should be fixed.

Takashi

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#4 lore raw
In reply to Takashi Iwai

Takashi Iwai wrote:
...

Quoted 1 line

how did you test spdif out?

I ran mpg123.
With nvidia's nvaudio driver, sound came out of the analog outputs and out of the SPDIF output immediately.

With the alsa driver, sound came out of the analog outputs only. I can control the volume both with the "Master" slider and the "PCM" slider, as expected.
No matter what combination of the IEC958 switches I set, there was light coming out of the SPDIF output, but no sound can be heard.

Quoted 2 lines

you need to choose the PCM "spdif" (aka
"iec958") for the proper output over SPDIF.

You mean alsamixer's "Item: IEC958"?
I did turn that on and off. No effect.
Just to make sure I am not misunderstanding you, I am attaching my /etc/asound.state. With that state, I hear the PCM sound on the analog output, but not on the SPDIF output.
If you'd like me to use different settings, please let me know and I'll test them immediately.

Quoted 3 lines

spdif input on ALC650 didn't work until this morning. i applied the patch from James to cvs, so now it should work (as long as sf's anon-cvs repository is properly mirrored).

OK, I will update to the latest CVS.
But I guess there is no chance that loop-though will work before PCM output works, right?

Carsten.

state.nForce2 {
	control.1 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Master Playback Switch'
		value true
	}
	control.2 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 31'
		iface MIXER
		name 'Master Playback Volume'
		value.0 22
		value.1 22
	}
	control.3 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Center Playback Switch'
		value false
	}
	control.4 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 31'
		iface MIXER
		name 'Center Playback Volume'
		value 0
	}
	control.5 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'LFE Playback Switch'
		value false
	}
	control.6 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 31'
		iface MIXER
		name 'LFE Playback Volume'
		value 0
	}
	control.7 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Surround Playback Switch'
		value.0 false
		value.1 false
	}
	control.8 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 31'
		iface MIXER
		name 'Surround Playback Volume'
		value.0 0
		value.1 0
	}
	control.9 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Master Mono Playback Switch'
		value false
	}
	control.10 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 31'
		iface MIXER
		name 'Master Mono Playback Volume'
		value 0
	}
	control.11 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'PC Speaker Playback Switch'
		value false
	}
	control.12 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 15'
		iface MIXER
		name 'PC Speaker Playback Volume'
		value 0
	}
	control.13 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Phone Playback Switch'
		value false
	}
	control.14 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 31'
		iface MIXER
		name 'Phone Playback Volume'
		value 0
	}
	control.15 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Mic Playback Switch'
		value false
	}
	control.16 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 31'
		iface MIXER
		name 'Mic Playback Volume'
		value 0
	}
	control.17 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Mic Boost (+20dB)'
		value false
	}
	control.18 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Line Playback Switch'
		value false
	}
	control.19 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 31'
		iface MIXER
		name 'Line Playback Volume'
		value.0 0
		value.1 0
	}
	control.20 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'CD Playback Switch'
		value false
	}
	control.21 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 31'
		iface MIXER
		name 'CD Playback Volume'
		value.0 0
		value.1 0
	}
	control.22 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Video Playback Switch'
		value false
	}
	control.23 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 31'
		iface MIXER
		name 'Video Playback Volume'
		value.0 0
		value.1 0
	}
	control.24 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Aux Playback Switch'
		value false
	}
	control.25 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 31'
		iface MIXER
		name 'Aux Playback Volume'
		value.0 0
		value.1 0
	}
	control.26 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'PCM Playback Switch'
		value true
	}
	control.27 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 31'
		iface MIXER
		name 'PCM Playback Volume'
		value.0 22
		value.1 22
	}
	control.28 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.item.0 Mic
		comment.item.1 CD
		comment.item.2 Video
		comment.item.3 Aux
		comment.item.4 Line
		comment.item.5 Mix
		comment.item.6 'Mix Mono'
		comment.item.7 Phone
		iface MIXER
		name 'Capture Source'
		value.0 Mic
		value.1 Mic
	}
	control.29 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Capture Switch'
		value true
	}
	control.30 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 15'
		iface MIXER
		name 'Capture Volume'
		value.0 0
		value.1 0
	}
	control.31 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name '3D Control - Switch'
		value false
	}
	control.32 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.item.0 Mix
		comment.item.1 Mic
		iface MIXER
		name 'Mono Output Select'
		value Mix
	}
	control.33 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.item.0 Mic1
		comment.item.1 Mic2
		iface MIXER
		name 'Mic Select'
		value Mic1
	}
	control.34 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 15'
		iface MIXER
		name '3D Control - Center'
		value 0
	}
	control.35 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 15'
		iface MIXER
		name '3D Control - Depth'
		value 0
	}
	control.36 {
		comment.access read
		comment.type IEC958
		iface MIXER
		name 'IEC958 Playback Con Mask'
		value '0fff000f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
	}
	control.37 {
		comment.access read
		comment.type IEC958
		iface MIXER
		name 'IEC958 Playback Pro Mask'
		value cf00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
	}
	control.38 {
		comment.access 'read write'
		comment.type IEC958
		iface MIXER
		name 'IEC958 Playback Default'
		value '0082000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
	}
	control.39 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'IEC958 Playback Switch'
		value true
	}
	control.40 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 3'
		iface MIXER
		name 'IEC958 Playback AC97-SPSA'
		value 2
	}
	control.41 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Duplicate Front'
		value false
	}
	control.42 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Surround Down Mix'
		value false
	}
	control.43 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Center/LFE Down Mix'
		value false
	}
	control.44 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Exchange Center/LFE'
		value false
	}
	control.45 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Line-In As Surround'
		value false
	}
	control.46 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Swap Surround Slot'
		value false
	}
	control.47 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Mic As Center/LFE'
		value false
	}
	control.48 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'IEC958 Capture Switch'
		value false
	}
	control.49 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'Analog to IEC958 Output'
		value true
	}
	control.50 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'IEC958 Input Monitor'
		value true
	}
	control.51 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface MIXER
		name 'External Amplifier Power Down'
		value false
	}
}
#5 lore raw

At Mon, 01 Sep 2003 15:45:14 +0200,

Quoted 17 lines · Carsten Koch

[1 <text/plain; us-ascii (7bit)>]
Takashi Iwai wrote:
...

Quoted 1 line

how did you test spdif out?

I ran mpg123.
With nvidia's nvaudio driver, sound came out of the analog outputs and out of the SPDIF output immediately.

With the alsa driver, sound came out of the analog outputs only. I can control the volume both with the "Master" slider and the "PCM" slider, as expected.
No matter what combination of the IEC958 switches I set, there was light coming out of the SPDIF output, but no sound can be heard.

Quoted 4 lines
Quoted 2 lines

you need to choose the PCM "spdif" (aka
"iec958") for the proper output over SPDIF.

You mean alsamixer's "Item: IEC958"?

no. for ALSA native apps, you can (should be able to) select a PCM device for use.

it's not supported in the OSS emulation over kernel modules, though. so, it won't work on mpg123.

you can try alternatively mpg321, which is based on libao.

Takashi

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#6 lore raw

Takashi Iwai wrote:
...

Quoted 7 lines

no. for ALSA native apps, you can (should be able to) select a PCM device for use.

it's not supported in the OSS emulation over kernel modules, though. so, it won't work on mpg123.

you can try alternatively mpg321, which is based on libao.

I did and it worked!
Many thanks!

The sound was playing too fast with mpg321.
I was using
mpg321 -o alsa09 --audiodevice hw:0,1
It seems like mpg321 was playing my 44.1kHz mp3 in 48kHz mode.

Next, I tried
alsaplayer -d hw:0,1
which worked correctly right away.
Thanks again!

I will now update to the latest cvs version and see if I can get loop-through of my DVB card's SPDIF out to work.

Carsten.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#7 lore raw

At Mon, 01 Sep 2003 16:40:02 +0200,

Quoted 11 lines · Carsten Koch

Takashi Iwai wrote:
...

Quoted 7 lines

no. for ALSA native apps, you can (should be able to) select a PCM device for use.

it's not supported in the OSS emulation over kernel modules, though. so, it won't work on mpg123.

you can try alternatively mpg321, which is based on libao.

Quoted 7 lines

I did and it worked!
Many thanks!

The sound was playing too fast with mpg321.
I was using

    mpg321 -o alsa09  --audiodevice hw:0,1

It seems like mpg321 was playing my 44.1kHz mp3 in 48kHz mode.

then try plughw:0,1.
alsa-lib will convert the sample rate automatically.

Takashi

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#8 lore raw

Takashi Iwai wrote:
...

Quoted 8 lines
Quoted 4 lines

The sound was playing too fast with mpg321.
I was using
mpg321 -o alsa09 --audiodevice hw:0,1
It seems like mpg321 was playing my 44.1kHz mp3 in 48kHz mode.

then try plughw:0,1.
alsa-lib will convert the sample rate automatically.

Unfortunately, the sound is playing too fast with plughw:0,1 as well.

Also, I was wrong about alsaplayer playing it at the right speed. Maybe I had left alsaplayer's speed at ~90% when I last used it. I started it again now with a new mp3 file to load and it played that one (and all other 44kHz files I tried from then on) too fast (both with hw:0,1 and with plughw:0,1).

One more question: Is there a way to make hw:0,1 or plughw:0,1 the default? Many programs do not have a --audiodevice parameter or use the OSS emulation and I would of course still like to hear their sound.

Carsten.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#9 lore raw

At Mon, 01 Sep 2003 17:58:15 +0200,

Quoted 9 lines · Carsten Koch

Takashi Iwai wrote:
...

Quoted 6 lines
Quoted 4 lines

The sound was playing too fast with mpg321.
I was using
mpg321 -o alsa09 --audiodevice hw:0,1
It seems like mpg321 was playing my 44.1kHz mp3 in 48kHz mode.

Quoted 4 lines
Quoted 2 lines

then try plughw:0,1.
alsa-lib will convert the sample rate automatically.

Unfortunately, the sound is playing too fast with plughw:0,1 as well.

please check /proc/asound/card1/pcm0p/sub0/hw_params during playback. if it shows 44100, perhaps spdif configuration doesn't match with the request one. please check the spdif status in /proc/asound/card/ac97#0, too.

Quoted 10 lines

Also, I was wrong about alsaplayer playing it at the right speed. Maybe I had left alsaplayer's speed at ~90% when I last used it. I started it again now with a new mp3 file to load and it played that one (and all other 44kHz files I tried from then on) too fast (both with hw:0,1 and with plughw:0,1).

One more question: Is there a way to make hw:0,1 or plughw:0,1 the default? Many programs do not have a --audiodevice parameter or use the OSS emulation and I would of course still like to hear their sound.

you can overwrite the default pcm in ~/.asoundrc with '!' prefix. for example,

	pcm.!default "hw:0,1"

for OSS emulation, try libaoss wrapper. (hope it still runs :)

Takashi

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#10 lore raw

Takashi Iwai wrote:
...

Quoted 4 lines
Quoted 1 line

Unfortunately, the sound is playing too fast with plughw:0,1 as well.

please check /proc/asound/card1/pcm0p/sub0/hw_params during playback.

vdr:~ # head /proc/asound/card?/pcm?p/sub?/hw_params ==> /proc/asound/card0/pcm0p/sub0/hw_params <== closed

==> /proc/asound/card0/pcm1p/sub0/hw_params <==
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 1024
buffer_size: 8192
tick_time: 10000

Quoted 3 lines

if it shows 44100, perhaps spdif configuration doesn't match with the request one. please check the spdif status in /proc/asound/card/ac97#0, too.

vdr:~ # head -99 /proc/asound/card?/ac97#0
0-0/0: Realtek ALC650 rev 0

Capabilities     :
DAC resolution   : 20-bit
ADC resolution   : 18-bit
3D enhancement   : Realtek 3D Stereo Enhancement

Current setup
Mic gain : +0dB [+0dB]
POP path : pre 3D
Sim. stereo : off

3D enhancement   : off
Loudness         : off
Mono output      : MIX
Mic select       : Mic1

ADC/DAC loopback : off
Extended ID : codec=0 rev=1 LDAC SDAC CDAC DSA=0 SPDIF DRA VRA
Extended status : SPCV LDAC SDAC CDAC SPDIF=7/8 SPDIF VRA
PCM front DAC : 44100Hz
PCM Surr DAC : 44100Hz
PCM LFE DAC : 44100Hz
PCM ADC : 48000Hz
SPDIF Control : Consumer PCM Copyright Category=0x2 Generation=1 Rate=44.1kHz

Quoted 4 lines

you can overwrite the default pcm in ~/.asoundrc with '!' prefix. for example,

	pcm.!default "hw:0,1"

That syntax did not work. It gives me the error message:
ALSA lib pcm.c:1787:(snd_pcm_open_conf) Invalid type for PCM default definition (id: default, value: hw:0,1)

I changed it to

pcm.!default {
type hw
card 0
device 1
}

Should that have the same effect?
At least I can now omit the -d parameter for alsaplayer and the sound is still coming out of the SPDIF output (still too fast, though, see above). I can also control the volume via alsaplayer's slider.
However, the alsamixer volume control has no effect and kde desktop sounds (i.e. typing ^G) do not work.
As I am not really using the analog output, it would be fine with me to simply delete/deactive/hide the analog output PCM device, so the SPDIF output becomes the only PCM device and everything (including the OSS emulation) works with it.
Is there a way to do that?

Carsten.

P.S.: I am still trying to update to the latest CVS, but I keep getting the error message:
cvs [update aborted]: end of file from server (consult above messages if any) I will keep trying and report any news on the loop-through as soon as I have successfully installed the latest CVS version.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#11 lore raw

At Mon, 01 Sep 2003 19:57:39 +0200,

Quoted 42 lines · Carsten Koch

Takashi Iwai wrote:
...

Quoted 4 lines
Quoted 1 line

Unfortunately, the sound is playing too fast with plughw:0,1 as well.

please check /proc/asound/card1/pcm0p/sub0/hw_params during playback.

vdr:~ # head /proc/asound/card?/pcm?p/sub?/hw_params ==> /proc/asound/card0/pcm0p/sub0/hw_params <== closed

==> /proc/asound/card0/pcm1p/sub0/hw_params <==
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 1024
buffer_size: 8192
tick_time: 10000

Quoted 3 lines

if it shows 44100, perhaps spdif configuration doesn't match with the request one. please check the spdif status in /proc/asound/card/ac97#0, too.

vdr:~ # head -99 /proc/asound/card?/ac97#0
0-0/0: Realtek ALC650 rev 0

Capabilities     :
DAC resolution   : 20-bit
ADC resolution   : 18-bit
3D enhancement   : Realtek 3D Stereo Enhancement

Current setup
Mic gain : +0dB [+0dB]
POP path : pre 3D
Sim. stereo : off

3D enhancement   : off
Loudness         : off
Mono output      : MIX
Mic select       : Mic1
Quoted 8 lines

ADC/DAC loopback : off
Extended ID : codec=0 rev=1 LDAC SDAC CDAC DSA=0 SPDIF DRA VRA
Extended status : SPCV LDAC SDAC CDAC SPDIF=7/8 SPDIF VRA
PCM front DAC : 44100Hz
PCM Surr DAC : 44100Hz
PCM LFE DAC : 44100Hz
PCM ADC : 48000Hz
SPDIF Control : Consumer PCM Copyright Category=0x2 Generation=1 Rate=44.1kHz

ok, then apparently it looks like working correctly. can you play mp3 on normal analog output correctly?

Quoted 7 lines
Quoted 4 lines

you can overwrite the default pcm in ~/.asoundrc with '!' prefix. for example,

	pcm.!default "hw:0,1"

That syntax did not work. It gives me the error message:
ALSA lib pcm.c:1787:(snd_pcm_open_conf) Invalid type for PCM default definition (id: default, value: hw:0,1)

yeah, the above was incorrect.

Quoted 10 lines

I changed it to

pcm.!default {
type hw
card 0
device 1
}

Should that have the same effect?

yes.

Quoted 4 lines

At least I can now omit the -d parameter for alsaplayer and the sound is still coming out of the SPDIF output (still too fast, though, see above). I can also control the volume via alsaplayer's slider.
However, the alsamixer volume control has no effect

because it's digital output.

Quoted 2 lines

and kde desktop sounds
(i.e. typing ^G) do not work.

perhaps artsd is running on oss mode.

Quoted 5 lines

As I am not really using the analog output, it would be fine with me to simply delete/deactive/hide the analog output PCM device, so the SPDIF output becomes the only PCM device and everything (including the OSS emulation) works with it.
Is there a way to do that?

so far, only by using oss-wrapper library.

Quoted 8 lines

Carsten.

P.S.: I am still trying to update to the latest CVS, but I keep getting the error message:
cvs [update aborted]: end of file from server (consult above messages if any) I will keep trying and report any news on the loop-through as soon as I have successfully installed the latest CVS version.

blame sourceforge :)

Takashi

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#12 lore raw

Takashi Iwai wrote:
...

Quoted 1 line

ok, then apparently it looks like working correctly.

Look: yes, sound: no. ;-)

Quoted 1 line

can you play mp3 on normal analog output correctly?

Yes. It looks like this:

vdr:~ # head /proc/asound/card?/pcm?p/sub?/hw_params ==> /proc/asound/card0/pcm0p/sub0/hw_params <==
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 1024
buffer_size: 8192
tick_time: 10000

==> /proc/asound/card0/pcm1p/sub0/hw_params <==
closed

and it sounds OK.

Carsten.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#13 lore raw

Hi,

here is a summary of the facts that I found so far regarding the optical SPDIF output on my Abit NF7 nforce2 main board:

Alsa Nvidia
driver driver

Default setting plays sound on analog output           Yes    Yes
Default setting plays sound on digital output          No     Yes
Sound works on both (D and A) outputs at the same time No     Yes
kde desktop sounds work on digital output              No     Yes
mpg123 works on digital output                         No     Yes(1)
mpg321 works on digital output                         Yes(2) Yes(3)
main volume slider controls volume on digital output   No     Yes
PCM volume slider controls volume on digital output    No     Yes
Digital output can be muted by mixer application       No     Yes

(1) Requires -r 48000 parameter unless file contains 48 kHz data.
(2) Requires -o alsa09 --audiodevice hw:0,1 parameters or an entry in ~/.asoundrc that makes device 1 the default. Sound is played at wrong speed unless data is 48kHz.
(3) Only if file contains 48 kHz data.

Carsten.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#14 lore raw

At Mon, 01 Sep 2003 23:00:59 +0200,

Quoted 5 lines · Carsten Koch

Hi,

here is a summary of the facts that I found so far regarding the optical SPDIF output on my Abit NF7 nforce2 main board:

some notes below.

Quoted 1 line

Sound works on both (D and A) outputs at the same time No Yes

you can do on alsa, too. that's why there are two devices.

Quoted 1 line

kde desktop sounds work on digital output No Yes

it's a configuration issue. you can set up correctly on kde control center to choose the appropriate device.

Quoted 1 line

mpg123 works on digital output No Yes(1)

possibly with libaoss wrapper.

Quoted 2 lines
main volume slider controls volume on digital output   No     Yes
PCM volume slider controls volume on digital output    No     Yes

nvidia driver does these evil things!
it shouldn't be done on the kernel.

Quoted 1 line

Digital output can be muted by mixer application No Yes

ditto.

Takashi

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#15 lore raw

Re: optical SPDIF output on Abit NF7 nforce2 main board. (Summary)

In reply to Carsten Koch

Hi,

here is a summary of my adventures with Alsa sound through SPDIF on my Abit NF7 nforce2 main board.

First I want to thank Takashi and James for their friendly and sedulous help.
Without them, I would have gotten no sound to work through the SPDIF output at all.

In the end, we got almost everything to work, except for the loop-through from SPDIF in to SPDIF out. Unfortunately, this is a requirement for me, so I gave up and now installed an additional C-Media PCI CMI8738 sound card on my PC, which works perfectly right out of the box.

In particular, with the C-Media PCI CMI8738, alsamixer provides me with a "IEC958 Loop" switch, which I need to loop the digital sound output of my DVB card to the sound card output which is connected to my HiFi equipment.

Other things that I find *much* user-friendlier about Alsa with the CMI8738 compared to Alsa with the on-board nforce 2 sound include:

* The CMI8738 default device (hw:0.0) plays through both the analog output and the SPDIF output at the same time. No need to tweak defaults through a .asoundrc file.
The nforce2 default device (hw:0.0) only plays through the analog output.

* All programs I tested (mpg123, alsaplayer, mpg321, kde desktop sound) simply worked with the CMI8738. No tweaking, no special parameters, no quirks.
With nforce2 sound, I needed a different tweak for each of them (if one was available at all) and some were causing strange effects. See the previous mails in this thread.

So far my general remarks from a user perspective.

From a technical perspective, the nforce2 provides the following 8 IEC958 controls:

% amixer controls | fgrep IEC958 numid=50,iface=MIXER,name='IEC958 Input Monitor' numid=36,iface=MIXER,name='IEC958 Playback Con Mask' numid=37,iface=MIXER,name='IEC958 Playback Pro Mask' numid=40,iface=MIXER,name='IEC958 Playback AC97-SPSA' numid=38,iface=MIXER,name='IEC958 Playback Default' numid=39,iface=MIXER,name='IEC958 Playback Switch' numid=48,iface=MIXER,name='IEC958 Capture Switch' numid=49,iface=MIXER,name='Analog to IEC958 Output'

While the CMI8738 provides the following 11 IEC958 controls:
% amixer controls | fgrep IEC958 numid=30,iface=MIXER,name='IEC958 5V' numid=29,iface=MIXER,name='IEC958 Copyright' numid=32,iface=MIXER,name='IEC958 In Monitor' numid=37,iface=MIXER,name='IEC958 In Phase Inverse' numid=38,iface=MIXER,name='IEC958 In Select' numid=28,iface=MIXER,name='IEC958 In Valid' numid=31,iface=MIXER,name='IEC958 Loop' numid=36,iface=MIXER,name='IEC958 Mix Analog' numid=34,iface=MIXER,name='IEC958 Playback Con Mask',device=2 numid=27,iface=MIXER,name='IEC958 Output Switch' numid=33,iface=PCM,name='IEC958 Playback Default',device=2

note in particular that the IEC958 Loop is missing on the nforce2. Also, on the CMI8738, SPDIF out is available through hw:0,0 (the default for most programs), while the nforce2 only gave me access to the SPDIF out via hw:0,1 - and that was only 48kHz (a hardware attribute of the chip), so I had to use plughw:0,1 which caused other problems.

So, for now my problem is solved by installing an additional sound card - unfortunately at the expense of a precious PCI slot. :-(

Any work on Alsa that will make the nforce2 driver as good as the cmipci driver will be highly appreciated.

Cheers,

Carsten.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#16 lore raw

Re: optical SPDIF output on Abit NF7 nforce2 main board. (Summary)

I forgot two more things:

1) If there is anything else you would like me to try out or any additional information from that system, I will be glad to help.

2) Is anyone else having similar problems?
Is it just me or do other nforce2 users also have the feeling that Alsa supports IEC958 much, much better on the CMI8738 than on nforce2?

Thanks again and Cheers,

Carsten.

Quoted 92 lines · Carsten Koch

Hi,

here is a summary of my adventures with Alsa sound through SPDIF on my Abit NF7 nforce2 main board.

First I want to thank Takashi and James for their friendly and sedulous help.
Without them, I would have gotten no sound to work through the SPDIF output at all.

In the end, we got almost everything to work, except for the loop-through from SPDIF in to SPDIF out. Unfortunately, this is a requirement for me, so I gave up and now installed an additional C-Media PCI CMI8738 sound card on my PC, which works perfectly right out of the box.

In particular, with the C-Media PCI CMI8738, alsamixer provides me with a "IEC958 Loop" switch, which I need to loop the digital sound output of my DVB card to the sound card output which is connected to my HiFi equipment.

Other things that I find *much* user-friendlier about Alsa with the CMI8738 compared to Alsa with the on-board nforce 2 sound include:

* The CMI8738 default device (hw:0.0) plays through both the analog output and the SPDIF output at the same time. No need to tweak defaults through a .asoundrc file.
The nforce2 default device (hw:0.0) only plays through the analog output.

* All programs I tested (mpg123, alsaplayer, mpg321, kde desktop sound) simply worked with the CMI8738. No tweaking, no special parameters, no quirks.
With nforce2 sound, I needed a different tweak for each of them (if one was available at all) and some were causing strange effects. See the previous mails in this thread.

So far my general remarks from a user perspective.

From a technical perspective, the nforce2 provides the following 8
IEC958 controls:

% amixer controls | fgrep IEC958 numid=50,iface=MIXER,name='IEC958 Input Monitor' numid=36,iface=MIXER,name='IEC958 Playback Con Mask' numid=37,iface=MIXER,name='IEC958 Playback Pro Mask' numid=40,iface=MIXER,name='IEC958 Playback AC97-SPSA' numid=38,iface=MIXER,name='IEC958 Playback Default' numid=39,iface=MIXER,name='IEC958 Playback Switch' numid=48,iface=MIXER,name='IEC958 Capture Switch' numid=49,iface=MIXER,name='Analog to IEC958 Output'

While the CMI8738 provides the following 11 IEC958 controls:
% amixer controls | fgrep IEC958 numid=30,iface=MIXER,name='IEC958 5V' numid=29,iface=MIXER,name='IEC958 Copyright' numid=32,iface=MIXER,name='IEC958 In Monitor' numid=37,iface=MIXER,name='IEC958 In Phase Inverse' numid=38,iface=MIXER,name='IEC958 In Select' numid=28,iface=MIXER,name='IEC958 In Valid' numid=31,iface=MIXER,name='IEC958 Loop' numid=36,iface=MIXER,name='IEC958 Mix Analog' numid=34,iface=MIXER,name='IEC958 Playback Con Mask',device=2 numid=27,iface=MIXER,name='IEC958 Output Switch' numid=33,iface=PCM,name='IEC958 Playback Default',device=2

note in particular that the IEC958 Loop is missing on the nforce2. Also, on the CMI8738, SPDIF out is available through hw:0,0 (the default for most programs), while the nforce2 only gave me access to the SPDIF out via hw:0,1 - and that was only 48kHz (a hardware attribute of the chip), so I had to use plughw:0,1 which caused other problems.

So, for now my problem is solved by installing an additional sound card - unfortunately at the expense of a precious PCI slot. :-(

Any work on Alsa that will make the nforce2 driver as good as the cmipci driver will be highly appreciated.

Cheers,

Carsten.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Signature · 14 lines
   ___________________________________________________________
  (                                                           )
  | Carsten Koch                  Phone: +49-4286-920001      |
  | ICEM Technologies GmbH          Fax: +49-4286-1608        |
  | Sotheler Mühlenweg 15        mailto:[email protected] |
  | 27404 Elsdorf-Hatzte, Germany  http://www.icem.com        |
  (___________________________________________________________)



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#17 lore raw

Re: optical SPDIF output on Abit NF7 nforce2 main board. (Summary)

Quoted 5 lines · Carsten Koch

I forgot two more things:

1) If there is anything else you would like me to try out or any additional information from that system, I will be glad to help.

Quoted 9 lines

2) Is anyone else having similar problems?
Is it just me or do other nforce2 users also have the feeling that Alsa supports IEC958 much, much better on the CMI8738 than on nforce2?

Thanks again and Cheers,

Carsten.

I think it basically comes down to lack of documentation about the chips. The sound cards that work well in linux have one of two things: -

1) good specification documents.
A lot of manufactures seem to publish specification documents for their chips, but very few of these published documents are complete and accurate. I have not found any AC97 chip yet that has full details on how to set non-audio bits on the SPDIF, although the chip manufacturer has published specification documents for the chip. E.g. Realtek ALC650.

2) Someone with the time to tinger about and discover how to do it.

Cheers
James

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#18 lore raw

Re: optical SPDIF output on Abit NF7 nforce2 main board.(Summary)

In reply to Carsten Koch

Hello,

i got the same problem as Carsten, with the same behavior. And i agree with him that it would
really nice if the nforce2 onboard soundchip would work like a cmi card.

in addition to Carsten i got some additional Information for the nforce2 chip (ASUS A7N8X Deluxe MoBo).

I wanted to record a 1 second wav to convert it to an mp2 for dvdauthoring, with the following command.
arecord -twav -fdat -d1 /silent.wav

with that command i got an error with "DMA or IRQ trouble" (see below). I think that parts of the
sound-chip aren't found by driver because they use different IRQ's and Memory regions, that would
explain the error message in syslog.
i hope with this information and the information from Carsten Koch, you will able to find
where the problem is.

with kind regards
Gerald

part of syslog message (no additional information):

Sep 28 19:40:59 vdr-eth0 kernel: ALSA ../alsa-kernel/core/pcm_lib.c:2452: capture

read error (DMA or IRQ trouble?)

the output of lspci -vvv for nforce2 chip:
00:05.0 Multimedia audio controller: nVidia Corporation nForce MultiMedia audio [Via VT82C686B] (rev a2)
Subsystem: Asustek Computer, Inc.: Unknown device 0c11
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort-
<MAbort- >SERR- <PERR-
Latency: 0 (250ns min, 3000ns max)
Interrupt: pin A routed to IRQ 22
Region 0: Memory at ed000000 (32-bit, non-prefetchable) [size=512K]
Capabilities: [44] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

00:06.0 Multimedia audio controller: nVidia Corporation nForce2 AC97 Audio Controler (MCP) (rev a1)
Subsystem: Asustek Computer, Inc.: Unknown device 8095
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort-
<MAbort- >SERR- <PERR-

        Latency: 0 (500ns min, 1250ns max)
        Interrupt: pin A routed to IRQ 21
        Region 0: I/O ports at e000 [size=256]
        Region 1: I/O ports at e400 [size=128]
        Region 2: Memory at ed080000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: [44] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA

PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-

and here is the output from /proc/asound/cards
0 [nForce2 ]: NFORCE - NVidia nForce2

                     NVidia nForce2 at 0xed080000, irq 21

and here is the output from /proc/asound/pcm
00-00: Intel ICH : NVidia nForce2 : playback 1 : capture 1 00-01: Intel ICH - IEC958 : NVidia nForce2 - IEC958 : playback 1

and here is the output from /proc/asound/nForce2/ac97#0

0-0/0: Realtek ALC650 rev 0

Capabilities     :
DAC resolution   : 20-bit
ADC resolution   : 18-bit
3D enhancement   : Realtek 3D Stereo Enhancement

Current setup
Mic gain : +0dB [+0dB]
POP path : pre 3D
Sim. stereo : off

3D enhancement   : off
Loudness         : off
Mono output      : MIX
Mic select       : Mic1

ADC/DAC loopback : off
Extended ID : codec=0 rev=1 LDAC SDAC CDAC DSA=0 SPDIF DRA VRA
Extended status : SPCV LDAC SDAC CDAC SPDIF=3/4 SPDIF VRA
PCM front DAC : 48000Hz
PCM Surr DAC : 48000Hz
PCM LFE DAC : 48000Hz
PCM ADC : 48000Hz
SPDIF Control : Consumer PCM Category=0x2 Generation=1 Rate=48kHz
SPDIF In Status : Consumer PCM Category=0x0 Generation=0 Rate=48kHz Accuracy=0 Locked

and here is the output from /proc/asound/nForce2/ac97#0regs 0:00 = 5980
0:02 = 0000
0:04 = 0000
0:06 = 801f
0:08 = 0000
0:0a = 801e
0:0c = 801f
0:0e = 0000
0:10 = 1f1f
0:12 = 9f1f
0:14 = 9f1f
0:16 = 9f1f
0:18 = 0000
0:1a = 0000
0:1c = 0f0f
0:1e = 0000
0:20 = 0000
0:22 = 0000
0:24 = 0000
0:26 = 000f
0:28 = 05c7
0:2a = 05c5
0:2c = bb80
0:2e = bb80
0:30 = bb80
0:32 = bb80
0:34 = 0000
0:36 = 9f80
0:38 = 9f9f
0:3a = 2824
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 = 0004
0:62 = 4220
0:64 = 0808
0:66 = 0808
0:68 = 0000
0:6a = 0800
0:6c = 0000
0:6e = 0014
0:70 = 0211
0:72 = 00a0
0:74 = 0043
0:76 = 0000
0:78 = 8003
0:7a = 57c3
0:7c = 414c
0:7e = 4720

Quoted 117 lines · Carsten Koch

I forgot two more things:

1) If there is anything else you would like me to try out or any additional information from that system, I will be glad to help.

2) Is anyone else having similar problems?
Is it just me or do other nforce2 users also have the feeling that Alsa supports IEC958 much, much better on the CMI8738 than on nforce2?

Thanks again and Cheers,

Carsten.

Quoted 83 lines · Carsten Koch

Hi,

here is a summary of my adventures with Alsa sound through SPDIF on my Abit NF7 nforce2 main board.

First I want to thank Takashi and James for their friendly and sedulous help.
Without them, I would have gotten no sound to work through the SPDIF output at all.

In the end, we got almost everything to work, except for the loop-through from SPDIF in to SPDIF out. Unfortunately, this is a requirement for me, so I gave up and now installed an additional C-Media PCI CMI8738 sound card on my PC, which works perfectly right out of the box.

In particular, with the C-Media PCI CMI8738, alsamixer provides me with a "IEC958 Loop" switch, which I need to loop the digital sound output of my DVB card to the sound card output which is connected to my HiFi equipment.

Other things that I find *much* user-friendlier about Alsa with the CMI8738 compared to Alsa with the on-board nforce 2 sound include:

* The CMI8738 default device (hw:0.0) plays through both the analog output and the SPDIF output at the same time. No need to tweak defaults through a .asoundrc file.
The nforce2 default device (hw:0.0) only plays through the analog output.

* All programs I tested (mpg123, alsaplayer, mpg321, kde desktop sound) simply worked with the CMI8738. No tweaking, no special parameters, no quirks.
With nforce2 sound, I needed a different tweak for each of them (if one was available at all) and some were causing strange effects. See the previous mails in this thread.

So far my general remarks from a user perspective.

From a technical perspective, the nforce2 provides the following 8
IEC958 controls:

% amixer controls | fgrep IEC958 numid=50,iface=MIXER,name='IEC958 Input Monitor' numid=36,iface=MIXER,name='IEC958 Playback Con Mask' numid=37,iface=MIXER,name='IEC958 Playback Pro Mask' numid=40,iface=MIXER,name='IEC958 Playback AC97-SPSA' numid=38,iface=MIXER,name='IEC958 Playback Default' numid=39,iface=MIXER,name='IEC958 Playback Switch' numid=48,iface=MIXER,name='IEC958 Capture Switch' numid=49,iface=MIXER,name='Analog to IEC958 Output'

While the CMI8738 provides the following 11 IEC958 controls:
% amixer controls | fgrep IEC958 numid=30,iface=MIXER,name='IEC958 5V' numid=29,iface=MIXER,name='IEC958 Copyright' numid=32,iface=MIXER,name='IEC958 In Monitor' numid=37,iface=MIXER,name='IEC958 In Phase Inverse' numid=38,iface=MIXER,name='IEC958 In Select' numid=28,iface=MIXER,name='IEC958 In Valid' numid=31,iface=MIXER,name='IEC958 Loop' numid=36,iface=MIXER,name='IEC958 Mix Analog' numid=34,iface=MIXER,name='IEC958 Playback Con Mask',device=2 numid=27,iface=MIXER,name='IEC958 Output Switch' numid=33,iface=PCM,name='IEC958 Playback Default',device=2

note in particular that the IEC958 Loop is missing on the nforce2. Also, on the CMI8738, SPDIF out is available through hw:0,0 (the default for most programs), while the nforce2 only gave me access to the SPDIF out via hw:0,1 - and that was only 48kHz (a hardware attribute of the chip), so I had to use plughw:0,1 which caused other problems.

So, for now my problem is solved by installing an additional sound card - unfortunately at the expense of a precious PCI slot. :-(

Any work on Alsa that will make the nforce2 driver as good as the cmipci driver will be highly appreciated.

Cheers,

Carsten.

Quoted 9 lines

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

--

    ___________________________________________________________
   (                                                           )
   | Carsten Koch                  Phone: +49-4286-920001      |
   | ICEM Technologies GmbH          Fax: +49-4286-1608        |
   | Sotheler Mühlenweg 15        mailto:[email protected] |
   | 27404 Elsdorf-Hatzte, Germany  http://www.icem.com        |

(___________________________________________________________)

Quoted 8 lines

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#19 lore raw
In reply to Carsten Koch

At Mon, 01 Sep 2003 21:13:02 +0200,

Quoted 23 lines · Carsten Koch

Takashi Iwai wrote:
...

Quoted 1 line

ok, then apparently it looks like working correctly.

Look: yes, sound: no. ;-)

Quoted 1 line

can you play mp3 on normal analog output correctly?

Yes. It looks like this:

vdr:~ # head /proc/asound/card?/pcm?p/sub?/hw_params ==> /proc/asound/card0/pcm0p/sub0/hw_params <==
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 1024
buffer_size: 8192
tick_time: 10000

Quoted 4 lines

==> /proc/asound/card0/pcm1p/sub0/hw_params <==
closed

and it sounds OK.

looking at the nvidia's driver code, it seems that spdif on nforce supports only 48k in fact.
i'll add the restriction on the driver side, then. could you try the attached patch?

Takashi

#20 lore raw

Takashi Iwai wrote:
...

Quoted 4 lines

looking at the nvidia's driver code, it seems that spdif on nforce supports only 48k in fact.
i'll add the restriction on the driver side, then. could you try the attached patch?

Sorry for the delay, I was travelling all day.

I did apply your patch (to my old cvs version, still having problems accessing sourceforge).

It made matters better for mpg321 and worse for alsaplayer.

"mpg321 -o alsa09 --audiodevice hw:0,1" still plays 44Khz sounds too fast, as expected.

"mpg321 -o alsa09 --audiodevice plughw:0,1" now plays 44Khz sounds correctly. Excellent!

"alsaplayer -d hw:0,1" still plays 44Khz sounds too fast, as expected.

"alsaplayer -d plughw:0,1" now issues the following error messages:
error on set_period_size (512)
Unavailable hw params:

ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (166 341334)
PERIOD_SIZE: (7 15053)
PERIOD_BYTES: (28 60212)
PERIODS: (0 2151)
BUFFER_TIME: (158 341316)
BUFFER_SIZE: [7 15052]
BUFFER_BYTES: [28 60208]
TICK_TIME: 10000
error on set_period_size (1024)
Unavailable hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (166 341334)
PERIOD_SIZE: (7 15053)
PERIOD_BYTES: (28 60212)
PERIODS: (0 2151)
BUFFER_TIME: (158 341316)
BUFFER_SIZE: [7 15052]
BUFFER_BYTES: [28 60208]
TICK_TIME: 10000

failed to configure output device...trying OSS

And plays the sound file via the analog output.

Carsten.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#21 lore raw

At Tue, 02 Sep 2003 22:31:40 +0200,

Quoted 10 lines · Carsten Koch

Takashi Iwai wrote:
...

Quoted 4 lines

looking at the nvidia's driver code, it seems that spdif on nforce supports only 48k in fact.
i'll add the restriction on the driver side, then. could you try the attached patch?

Sorry for the delay, I was travelling all day.

Quoted 7 lines

I did apply your patch (to my old cvs version, still having problems accessing sourceforge).

It made matters better for mpg321 and worse for alsaplayer.

"mpg321 -o alsa09 --audiodevice hw:0,1" still plays 44Khz sounds too fast, as expected.

note that it's correct behavior.
hw layer doesn't do sample rate conversion.

Quoted 8 lines

"mpg321 -o alsa09 --audiodevice plughw:0,1" now plays 44Khz sounds correctly. Excellent!

"alsaplayer -d hw:0,1" still plays 44Khz sounds too fast, as expected.

"alsaplayer -d plughw:0,1" now issues the following error messages:
error on set_period_size (512)

(snip)

looks like a bug of alsaplayer. please specify sample rate 48000.

Takashi

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven.
http://thinkgeek.com/sf