Re: nforce ac97 plays too fast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/29/07, Stas Sergeev <stsp@xxxxxxxx> wrote:
> Hello.
>
> Trying to get a software amplification to
> work with NForce CK804 AC'97, I've found
> out that whatever the asound.conf I write,
> the sound starts playing much faster than
> it should.
> After some debugging, I've found out the
> following:
> - The card (or the driver) only supports
> 48000KHz.
> - The program (any, because libao and artsd
> suffer from that) is trying to set some
> rate with snd_pcm_hw_params_set_rate_near(),
> and that succeeds, but the returned rate
> is 48000, while the requested is, say, 22050.
> No wonder it then plays with the wrong speed.
> Of course the program can check the returned
> rate, but it sets the "direction" parameter
> to 0, which should mean "take exactly that
> value".
> I've looked into an alsa-tutorial, and the
> examples there do not check the returned
> rate too - dir==0 should be enough.

What ALSA tutorial are you looking at?  All the ones I am familiar
with state that you must check the returned rate.  Direction is just a
hint.

http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___h_w___params.html#ga3602c3c8912acf66c4db29f96608021

For example:

http://www.alsa-project.org/alsa-doc/alsa-lib/_2test_2pcm_8c-example.html#a18
http://www.alsa-project.org/alsa-doc/alsa-lib/_2test_2latency_8c-example.html#a12
http://www.suse.de/~mana/alsa090_howto.html

Lee
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux