From: Clemens Ladisch <clemens@ladisch.de>
To: Uli Franke <uli.franke@weiss.ch>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: Dummy module and sample rates
Date: Thu, 24 Sep 2015 20:40:00 +0200 [thread overview]
Message-ID: <56044380.4030109@ladisch.de> (raw)
In-Reply-To: <5603D532.9080201@weiss.ch>
Uli Franke wrote:
>>> I set the hw params sample rate to 44k1 without error, but a subsequent
>>> call of snd_pcm_start returns EPIPE.
>>
>> In theory, this error code is returned if you didn't write any samples
>> into the buffer before starting.
> T(snd_pcm_start(pcm));
>
> n = snd_pcm_writei(pcm,
> buffer,
> ARRAY_SIZE(buffer) / channels);
And indeed this code tries to start the device without any samples in
the buffer.
>>> When setting hw params sample rate to 4k this does not happen.
This appears to be an artifact of the resampler.
> When I write samples before starting the stream, snd_pcm_start returns
>
> File descriptor in bad state (-77)
>
> which is obvious as the state of the stream changes from PREPARED to
> RUNNING.
To prevent the device from starting automatically, change the
start_threshold.
Regards,
Clemens
next prev parent reply other threads:[~2015-09-24 18:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-23 11:43 Dummy module and sample rates Uli Franke
2015-09-24 7:02 ` Clemens Ladisch
2015-09-24 10:49 ` Uli Franke
2015-09-24 18:40 ` Clemens Ladisch [this message]
2015-10-10 7:59 ` Raymond Yau
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=56044380.4030109@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=uli.franke@weiss.ch \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox