Skip to contentSkip to conversation

Card won't accept new sample rate?

DISCUSSION Daniel James 2 participants 5 messages Aug 29, 2006

lore
Share & tools
lore
#0 lore raw

Hello all,

Here's a strange problem that's affecting at least three different machines running Debian, or in our case, the 64 Studio distro made up of Debian packages:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=377915

This bug is not related to qjackctl, as first thought. Here are the steps to reproduce it:

1. Start jack on the command line at 44100Hz using the alsa backend

2. Start any jack application and see the sample rate reported as 48000Hz

In fact it doesn't matter which rate you try to start jack at, the sample rate is always reported as 48000Hz. This bug only happens with the alsa backend, the oss and dummy backends work as normal.

The problem has been observed on three different AC97 soundcards, running various kernels from 2.6.16 to 2.6.17. The alsa-base version is 1.0.11-5. However one machine with an AC97 on-board sound chipset, running Debian unstable, does not show the problem. Also, all these machines were working fine with ALSA and jack until recently.

Any clues would be greatly appreciated. A machine is available on-line for testing if that is required - if you would like to log in to it, please let me know and I'll send you the IP address and login.

Cheers!

Daniel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#1 lore raw

At Tue, 29 Aug 2006 14:19:41 +0100,

Quoted 12 lines · Daniel James

Hello all,

Here's a strange problem that's affecting at least three different machines running Debian, or in our case, the 64 Studio distro made up of Debian packages:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=377915

This bug is not related to qjackctl, as first thought. Here are the steps to reproduce it:

Quoted 7 lines

1. Start jack on the command line at 44100Hz using the alsa backend

2. Start any jack application and see the sample rate reported as 48000Hz

In fact it doesn't matter which rate you try to start jack at, the sample rate is always reported as 48000Hz. This bug only happens with the alsa backend, the oss and dummy backends work as normal.

OSS does software sample rate conversion as default.

Quoted 9 lines

The problem has been observed on three different AC97 soundcards, running various kernels from 2.6.16 to 2.6.17. The alsa-base version is 1.0.11-5. However one machine with an AC97 on-board sound chipset, running Debian unstable, does not show the problem. Also, all these machines were working fine with ALSA and jack until recently.

Any clues would be greatly appreciated. A machine is available on-line for testing if that is required - if you would like to log in to it, please let me know and I'll send you the IP address and login.

My wild guess is that your ac97 codec chip really supports only 48kHz. For example, C-Media codecs do so.

Check your /proc/asound/card0/codec97#0/ac97#0-0 file, whether it contains "VRA" in Extended ID section. If not, it's 48k-only codec.

Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#2 lore raw

Hi Takashi,

Quoted 1 line

OSS does software sample rate conversion as default.

Right, that figures.

Quoted 2 lines

Check your /proc/asound/card0/codec97#0/ac97#0-0 file, whether it contains "VRA" in Extended ID section. If not, it's 48k-only codec.

Indeed it does not - thanks for the clue :-)

I have put an extra soundcard in one of the test machines showing the problem. The new card has the ice1712 chipset, and this changes sample rate perfectly.

Is there any change that has been made to ALSA recently, which would mean that a 48k-only chipset no longer does sample rate conversion in software by default? If not, could this be something broken in Debian's configuration of ALSA?

Thanks!

Daniel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#3 lore raw

At Tue, 29 Aug 2006 15:32:10 +0100,

Quoted 12 lines · Daniel James

Hi Takashi,

Quoted 1 line

OSS does software sample rate conversion as default.

Right, that figures.

Quoted 2 lines

Check your /proc/asound/card0/codec97#0/ac97#0-0 file, whether it contains "VRA" in Extended ID section. If not, it's 48k-only codec.

Indeed it does not - thanks for the clue :-)

Quoted 8 lines

I have put an extra soundcard in one of the test machines showing the problem. The new card has the ice1712 chipset, and this changes sample rate perfectly.

Is there any change that has been made to ALSA recently, which would mean that a 48k-only chipset no longer does sample rate conversion in software by default? If not, could this be something broken in Debian's configuration of ALSA?

If you start JACK, usually it prefers "hw" PCM, which means the direct access to the hardware without resampling, up/downmix, and format conversion (also without soft-mixing). The "default" PCM is with everything, i.e. dmix, and plug layer.

So, I guess this is intentional behavior.

Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#4 lore raw

Hi Takashi,

Quoted 4 lines

If you start JACK, usually it prefers "hw" PCM, which means the direct access to the hardware without resampling, up/downmix, and format conversion (also without soft-mixing). The "default" PCM is with everything, i.e. dmix, and plug layer.

Right - I just tried 'default' on my laptop, which points to the AC97 chipset, and JACK wouldn't even start at 44100Hz. I switched to 'default' at 48000Hz and it worked.

However if I plug in a USB audio interface (M Audio MobilePre), used as hw:2, then jack starts fine at either 44100 or 48000 and the sample rate is correctly displayed in qjackctl.

I think it's because of this USB interface that I believed JACK used to work at 44100Hz on this particular laptop. Now I know different :-)

Thanks!

Daniel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642