via82xx 1.0.0rc1 experience
i have a new box with an ASRock K7VM2 board, it comes with an on-board audio interface:
<lspci -vv>
00:11.5 Multimedia audio controller: VIA Technologies, Inc. AC97 Audio Controller (rev 50)
Subsystem: Unknown device 1849:3059
Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium
Quoted 1 line
TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin C routed to IRQ 22
Region 0: I/O ports at cc00 [size=256]
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mAPME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
</lspci>
it works fine on 2.4.22 with alsa-driver-1.0.0rc1 and these module options:
<modules.conf>
options snd-via82xx index=0 id=ac97 ac97_clock=48000 dxs_support=2 </modules.conf>
other dxs_support values cause block-size *and* erratic distortion in the output sound. ac97_clock=44100 causes slowed-down playback.
however, to enable analog output (only one present on the board) the mixer controls for 'headphone' not 'master' must be unmuted (volume and playback switch). since they aren't accessible from alsamixer this had me puzzling for a while.
before i turned on CONFIG_X86_UP_IOAPIC, the relevant IRQ was shared between eth0, usb-uhci and snd-via82xx. as a result, when the PCM was playing, it stopped when there was eth0 traffic (IRQ dropped?) and resumed playing when the mouse was moved (usb-uhci IRQ?). the oss driver (via82cxxx_audio) played steadily under the same circumstances. now things work perfectly however, another welcome opportunity for me to thank you for your fine efforts.
one question remains: iiutc, the hw DACs run at a fixed rate of 48kHz. then again when playing 44.1 kHz audio i read this:
<hw_params>
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)period_size: 2048buffer_size: 16384tick_time: 10000
OSS format: S16_LE
OSS channels: 2
OSS rate: 44100
OSS period bytes: 8192
OSS periods: 8
</hw_params>
so is my understanding about fixed-rate DACs incorrect, or is there resampling going on? the output audio quality is quite good fwiw.
tim
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
At Thu, 4 Dec 2003 13:47:07 +0100 (CET),
Quoted 23 lines · Tim Goetze
i have a new box with an ASRock K7VM2 board, it comes with an on-board audio interface:
<lspci -vv>
00:11.5 Multimedia audio controller: VIA Technologies, Inc. AC97 Audio Controller (rev 50)
Subsystem: Unknown device 1849:3059
Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=mediumQuoted 1 line
TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin C routed to IRQ 22
Region 0: I/O ports at cc00 [size=256]
Capabilities: [c0] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mAPME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
</lspci>it works fine on 2.4.22 with alsa-driver-1.0.0rc1 and these module options:
Quoted 6 lines
<modules.conf>
options snd-via82xx index=0 id=ac97 ac97_clock=48000 dxs_support=2 </modules.conf>other
dxs_supportvalues cause block-size *and* erratic distortion in the output sound. ac97_clock=44100 causes slowed-down playback.
ok, i'll add dxs_support=2 as default for your board. (still i'm wondering dxs_support=1 or 4 might work.)
as default, ac97_clock is 48000, so you don't need to specify it. a different ac97_clock shouldn't be given unless the chip is really driven in that clock.
Quoted 4 lines
however, to enable analog output (only one present on the board) the mixer controls for 'headphone' not 'master' must be unmuted (volume and playback switch). since they aren't accessible from alsamixer this had me puzzling for a while.
please show /proc/asound/card0/codec97#0/* files.
the mixer assignment depends on ac97 codec, not the sound DMA chip itself.
Quoted 1 line
one question remains: iiutc, the hw DACs run at a fixed rate of 48kHz.
no, it's in the case dxs_support=3 (and 0 if no pre-definition).
thanks for the feedback.
ciao,
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Quoted 9 lines · Takashi Iwai
Quoted 6 lines
<modules.conf>
options snd-via82xx index=0 id=ac97 ac97_clock=48000 dxs_support=2 </modules.conf>other
dxs_supportvalues cause block-size *and* erratic distortion in the output sound. ac97_clock=44100 causes slowed-down playback.ok, i'll add dxs_support=2 as default for your board. (still i'm wondering dxs_support=1 or 4 might work.)
dxs_support=1 produces garbled sound.
dxs_support=4 works ok!
iirc it didn't with the shared interrupt line, want me to try again? i'm not in the mood for rebooting right now if it needn't be.
tried playing three 16-bit stereo 44.1 kHz streams via OSS-emulation in parallel, it works. amazing!
Quoted 3 lines
as default,
ac97_clockis 48000, so you don't need to specify it. a differentac97_clockshouldn't be given unless the chip is really driven in that clock.
ok, i was suspecting so.
Quoted 6 lines
Quoted 4 lines
however, to enable analog output (only one present on the board) the mixer controls for 'headphone' not 'master' must be unmuted (volume and playback switch). since they aren't accessible from alsamixer this had me puzzling for a while.
please show /proc/asound/card0/codec97#0/* files.
follows at the end of this mail (module loaded with dxs_support=4).
Quoted 1 line
thanks for the feedback.
thanks for the quick answer. :)
tim
ps: cat /proc/asound/card0/codec97#0/*
0-0/0: VIA Technologies VIA1612A
Capabilities : -headphone out-
DAC resolution : 18-bit
ADC resolution : 18-bit
3D enhancement : IC Ensemble/KS Waves
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=0 AMAP DSA=0 VRA
Extended status : VRA
PCM front DAC : 48000Hz
PCM ADC : 48000Hz
0:00 = 6d50
0:02 = 8808
0:04 = 0808
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 = 0808
0:1a = 0000
0:1c = 8000
0:1e = 0000
0:20 = 0000
0:22 = 0000
0:24 = 0000
0:26 = 000f
0:28 = 0201
0:2a = 0001
0:2c = bb80
0:2e = 0000
0:30 = 0000
0:32 = bb80
0:34 = 0000
0:36 = 0000
0:38 = 0000
0:3a = 0000
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 = 8230
0:5c = 0010
0:5e = f7ff
0:60 = 0000
0:62 = 0000
0:64 = 0000
0:66 = 0000
0:68 = 0000
0:6a = 0000
0:6c = 0000
0:6e = 0000
0:70 = 0000
0:72 = 0000
0:74 = 0000
0:76 = 0000
0:78 = 0000
0:7a = 0000
0:7c = 5649
0:7e = 4161
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Can't set 88.2/96kHz samplerate with Hammerfall
Hi
Whenever I try to activate double speed (88.2/96kHz) mode with my RME Hammerfall Lite (DIGI 9636), snd_pcm_hw_params fails with a 'Device or resource busy' message. This is with the number of channels set to 10, since the number of ADAT channels is halved. Is this a known defect of the Hammerfall driver?
Thanks
Arve Knudsen
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
RE: Can't set 88.2/96kHz samplerate with Hammerfall
Quoted 8 lines
Whenever I try to activate double speed (88.2/96kHz) mode with my RME Hammerfall Lite (DIGI 9636),
snd_pcm_hw_paramsfails with a 'Device or resource busy' message. This is with the number of channels set to 10, since the number of ADAT channels is halved. Is this a known defect of the
Hammerfall driver?
Quoted 5 lines
Thanks
Arve Knudsen
From the Hammerfall Light Alsa sound card page:
Known bugs
- 96kHz and 88.2kHz not accessible via PCM interface
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Re: Can't set 88.2/96kHz samplerate with Hammerfall
Quoted 10 lines · Mark Knecht
Quoted 10 lines
Whenever I try to activate double speed (88.2/96kHz) mode with my RME Hammerfall Lite (DIGI 9636),
snd_pcm_hw_paramsfails with a 'Device or resource busy' message. This is with the number of channels set to 10, since the number of ADAT channels is halved. Is this a known defect of the
Hammerfall driver?Thanks
Quoted 7 lines
Quoted 1 line
Arve Knudsen
From the Hammerfall Light Alsa sound card page:
Known bugs
- 96kHz and 88.2kHz not accessible via PCM interface
Ok, thanks. I suppose I should've investigated a little better. Too bad, I would like to see this card working as well as under Windows.
Regards
Arve Knudsen
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
RE: Can't set 88.2/96kHz samplerate with Hammerfall
Quoted 5 lines
Quoted 5 lines
From the Hammerfall Light Alsa sound card page:
Known bugs
Quoted 8 lines
Quoted 1 line
- 96kHz and 88.2kHz not accessible via PCM interface
Ok, thanks. I suppose I should've investigated a little better. Too bad, I
would like to see this card working as well as under Windows.Regards
Arve Knudsen
Me too. I own the same card in one of my systems. This is really the downside to Linux audio. Without dedicated developers that own the cards and continue working on improvements support stalls out. The best I've been able to determine is that this card last got a real facelift over a year ago and since then nothing. I've grown to accept that it will never happen, and will be overjoyed that was if and when it finally does. Don't expect anything soon, unless you're willing to be that developer.
BTW - if you get a chance, take a look at /proc/asound/card0/hdsp (modify the card number if required and I'm guessing on the hdsp part) and see if it's listing spdif under the status section? Mine doesn't, or didn't, the last time I looked. It indicated 3 ADAT ports which this card does not have.
- Mark
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Re: Can't set 88.2/96kHz samplerate with Hammerfall
Quoted 14 lines · Mark Knecht
Quoted 5 lines
Quoted 5 lines
From the Hammerfall Light Alsa sound card page:
Known bugs
Quoted 8 lines
Quoted 1 line
- 96kHz and 88.2kHz not accessible via PCM interface
Ok, thanks. I suppose I should've investigated a little better. Too bad, I
would like to see this card working as well as under Windows.Regards
Arve Knudsen
Quoted 7 lines
Me too. I own the same card in one of my systems. This is really the downside to Linux audio. Without dedicated developers that own the cards and continue working on improvements support stalls out. The best I've been able to determine is that this card last got a real facelift over a year ago and since then nothing. I've grown to accept that it will never happen, and will be overjoyed that was if and when it finally does. Don't expect anything soon, unless you're willing to be that developer.
Actually, I'm not completely opposed to the idea. But I am totally clueless when it comes to writing device drivers, and would have no idea where to start. Do you know if RME were forthcoming with specs?
Regards
Arve Knudsen
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Re: Can't set 88.2/96kHz samplerate with Hammerfall
Quoted 6 lines
Quoted 1 line
be overjoyed that was if and when it finally does. Don't expect anythin=
g
Quoted 1 line
soon, unless you're willing to be that developer.
Actually, I'm not completely opposed to the idea. But I am totally=20 clueless when it comes to writing device drivers, and would have no idea=20 where to start. Do you know if RME were forthcoming with specs?
they were. but you can also offer to pay someone to fix the driver. the correct model already exists in the RME HDSP driver, and it wouldn't be that hard to implement for the digi9652. perhaps 1-3 hours work overall.
--p
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Re: Can't set 88.2/96kHz samplerate with Hammerfall
In reply to Arve KnudsenQuoted 4 lines
Actually, I'm not completely opposed to the idea. But I am totally clueless when it comes to writing device drivers, and would have no idea where to start.
Start here: http://www.alsa-project.org/documentation.php3#Driver
You don't have to start writing the driver from scratch. You only have to fix the current driver so you can also select 96KHz from the PCM interface. The API is not difficult to learn.
Quoted 1 line
Do you know if RME were forthcoming with specs?
I asked for infos one year ago, but they just said no.
--
Giuliano.
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Re: Can't set 88.2/96kHz samplerate with Hammerfall
Quoted 10 lines
Quoted 4 lines
Actually, I'm not completely opposed to the idea. But I am totally clueless when it comes to writing device drivers, and would have no idea where to start.
Start here: http://www.alsa-project.org/documentation.php3#Driver
You don't have to start writing the driver from scratch. You only have to fix the current driver so you can also select 96KHz from the PCM interface. The API is not difficult to learn.
there's almost no API work to do. the problem is really simple and already solved in a closely related driver.
when you change between an SS (44.1/48) and DS rate (88.2/96), it changes the channel count. this would be a bad thing if the PCM device is open, because it alters all the addresses of the channel buffers etc. etc. so the driver prevents you from doing this if the PCM device is open. this creates a paradox, because you've already got the device open.
the hdsp driver takes a different approach to this, even though it faces an identical problem. its a better design, one based on our experience with the digi9652 driver and its shortcomings. i'd love to go in and fix the digi9652, but short of some compelling reason for me to do so, with the work on ardour+jack at the level it is right now, i just don't have time.
Quoted 3 lines
Quoted 1 line
Do you know if RME were forthcoming with specs?
I asked for infos one year ago, but they just said no.
they don't want to get involved with lots of people being sent specs. the driver itself is the best source of documentation - its more accurate than the information they sent me :)
--p
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Re: Can't set 88.2/96kHz samplerate with Hammerfall
In reply to Arve KnudsenQuoted 15 lines
Quoted 12 lines · On Thu, 4 Dec 2003 06:41:56 -0800, Mark Knecht <[email protected]>=20…
Quoted 11 lines
Whenever I try to activate double speed (88.2/96kHz) mode with my RME Hammerfall Lite (DIGI 9636),
snd_pcm_hw_paramsfails with a 'Device or resource busy' message. This is with the number of channels set to 10, since the number of ADAT channels is halved. Is this a known defect of the
Hammerfall driver?Thanks
Arve Knudsen
Quoted 8 lines
Quoted 5 lines
From the Hammerfall Light Alsa sound card page:
Known bugs
- 96kHz and 88.2kHz not accessible via PCM interface
Ok, thanks. I suppose I should've investigated a little better. Too bad, = I=20
would like to see this card working as well as under Windows.
to be clear: you can't get DS mode using the PCM interface but you CAN (and several people have) do this, you just have to use the control interface in addition.
--p
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
Re: Can't set 88.2/96kHz samplerate with Hammerfall
Quoted 19 lines · Paul Davis
Quoted 19 lines
Quoted 16 lines · On Thu, 4 Dec 2003 06:41:56 -0800, Mark Knecht <[email protected]>=20…
Quoted 11 lines
Whenever I try to activate double speed (88.2/96kHz) mode with my RME Hammerfall Lite (DIGI 9636),
snd_pcm_hw_paramsfails with a 'Device or resource busy' message. This is with the number of channels set to 10, since the number of ADAT channels is halved. Is this a known defect of the
Hammerfall driver?Thanks
Arve Knudsen
From the Hammerfall Light Alsa sound card page:
Known bugs
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
- 96kHz and 88.2kHz not accessible via PCM interface
Ok, thanks. I suppose I should've investigated a little better. Too bad, = I=20
would like to see this card working as well as under Windows.to be clear: you can't get DS mode using the PCM interface but you CAN (and several people have) do this, you just have to use the control interface in addition.
Ah, didn't see your mail untill now. For some reason, you wind up under spam (Opera mail client filter) :\ I suppose I should investigate this possibility.
Thanks
Arve Knudsen
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/