All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: alsa-devel@alsa-project.org
Subject: Re: Using snd_pcm_set_params() on a capture handle
Date: Mon, 26 Oct 2015 10:44:32 +0100	[thread overview]
Message-ID: <562DF600.8020809@ladisch.de> (raw)
In-Reply-To: <20151026202321.cc3f5496a60a9369542d6be6@mega-nerd.com>

Erik de Castro Lopo wrote:
> Clemens Ladisch wrote:
>> Erik de Castro Lopo wrote:
>>>     RATE: [44100 96000]
>>
>> snd_pcm_set_params() should have chosen a single rate.
>> Did you dump this after that call?
>
> Yep, the code is:
>
>     snd_pcm_set_params (capture_handle, format, SND_PCM_ACCESS_RW_INTERLEAVED, 2, rate, 0, 25000))
>     snd_pcm_hw_params_any (capture_handle, hw_params)
>     snd_pcm_hw_params_dump (hw_params, output) ;

snd_pcm_hw_params_any() gets a _new_ set of parameters.  You would use
it when you want to configure the device for the first time, or when you
want to reconfigure it from scratch.

To get the current parameters of the device, use snd_pcm_hw_params_current().


Regards,
Clemens

  reply	other threads:[~2015-10-26  9:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-25  6:44 Using snd_pcm_set_params() on a capture handle Erik de Castro Lopo
2015-10-25 20:11 ` Clemens Ladisch
2015-10-26  8:47   ` Erik de Castro Lopo
2015-10-26  9:17     ` Clemens Ladisch
2015-10-26  9:23       ` Erik de Castro Lopo
2015-10-26  9:44         ` Clemens Ladisch [this message]
2015-10-26  9:54           ` Erik de Castro Lopo
2015-10-26 11:27             ` Lars-Peter Clausen
2015-10-26 15:26 ` Raymond Yau
2015-10-26 20:00   ` Erik de Castro Lopo
2015-10-27  5:01     ` 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=562DF600.8020809@ladisch.de \
    --to=clemens@ladisch.de \
    --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.