From: Stas Sergeev <stsp@aknet.ru>
To: alsa-devel@alsa-project.org
Subject: nforce ac97 plays too fast
Date: Sat, 29 Sep 2007 11:52:08 +0400 [thread overview]
Message-ID: <46FE0428.1070501@aknet.ru> (raw)
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.
Looking into the sources, it seems the culprit
is the snd_interval_refine_min/max(), which do
not care about the (i->min > min && !openmin)
case at all.
The question is: is setting dir=0 (or even
NULL, since it is a pointer) enough to set
the exact rate?
And if so - how snd_interval_refine_min()
should handle the (i->min > min && !openmin)
case?
Or if not - what does the dir==0 mean
and why it is not adjusted to the proper
value on return, when the rate is changed?
(i.e. the rate parameter changes from
22050 to 48000, but the dir parameter remains
0, doesn't change)
With the default configuration the rate is
proper, but I find it annoying that altering
asound.conf in pretty much any way gets the
wrong results.
next reply other threads:[~2007-09-29 7:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-29 7:52 Stas Sergeev [this message]
2007-09-30 1:51 ` nforce ac97 plays too fast Lee Revell
2007-09-30 10:12 ` Stas Sergeev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46FE0428.1070501@aknet.ru \
--to=stsp@aknet.ru \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.