[Jackit-devel] [linux-audio-user] JACK samplerate stuck at 48000

Cesare Marilungo cesare at poeticstudios.com
Tue Jun 20 22:10:28 EDT 2006


Paul Davis wrote:

>On Tue, 2006-06-20 at 20:27 +0200, Florian Paul Schmidt wrote:
>  
>
>>On Tue, 20 Jun 2006 13:29:18 -0400
>>Lee Revell <rlrevell at joe-job.com> wrote:
>>
>>    
>>
>>>On Tue, 2006-06-20 at 10:24 -0700, Mark Knecht wrote:
>>>      
>>>
>>>>Many built-in/inexpensive sound cards are stuck at 48K. Possibly this
>>>>one is also?
>>>>
>>>>        
>>>>
>>>It's still a bug for JACK not to report any error.
>>>
>>>Does aplay report any errors with a 44100Hz file?
>>>      
>>>
>>Hmm, is this it:
>>
>>Index: drivers/alsa/alsa_driver.c
>>===================================================================
>>--- drivers/alsa/alsa_driver.c  (revision 976)
>>+++ drivers/alsa/alsa_driver.c  (working copy)
>>@@ -445,13 +445,13 @@
>>        frame_rate = driver->frame_rate ;
>>        err = snd_pcm_hw_params_set_rate_near (handle, hw_params,
>>                                               &frame_rate, NULL) ;
>>-       driver->frame_rate = frame_rate ;
>>-       if (err < 0) {
>>+       if (err < 0 || (driver->frame_rate != frame_rate)) {
>>    
>>
>
>no, that doesn't work.
>
>the lack of any "retval != requested_val" test was changed a year or two
>back, on purpose. if we want to test this, the test has to be flexible:
>some h/w will report as real rate of 44099 rather than 44100.
>
>  
>
Wouldn't be ok to have:

+       if (err < 0 || ( abs(driver->frame_rate - frame_rate) < 10 )) {


The fact that jack didn't report that he couldn't set a choosen rate caused a bit of an headache to me too when I tried it for the first time on my laptop.

c.

-- 
www.cesaremarilungo.com




More information about the Linux-audio-user mailing list