From: Clemens Ladisch <clemens@ladisch.de>
To: Tim Hewett <tghewett2@onetel.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Discovery of device characteristics
Date: Wed, 20 Feb 2013 21:28:12 +0100 [thread overview]
Message-ID: <512531DC.6010701@ladisch.de> (raw)
In-Reply-To: <B053C7AF-BC91-4B13-B3AE-963AB6CC988C@onetel.com>
Tim Hewett wrote:
> I'm writing software looking to discover the available sample rates,
> channel formats etc. for a device. I have been taking the approach of
> testing a sample rate from a list of potential rates, then setting the
> device to that rate to then test the channel formats etc..
>
> It works ok usually but keeps failing to detect that the device
> supports 24-bit channel formats, both for SND_PCM_FORMAT_S24_LE/BE and
> SND_PCM_FORMAT_S24_3LE/3BE. It detects the 16-bit formats without any
> problem.
Which device (driver) is this?
> Online source taken from http://download.atmark-techno.com/misc/demos/usb-audio-a500-howto/hw_params.c
> does detect the 24-bit format but doesn't set the sample rate first -
> each characteristic is tested in isolation - snd_pcm_hw_params_any()
> is called before each one.
snd_pcm_hw_params_any() is called only once; the configurations space
isn't reduced as long as no set* function is called.
> I am wondering if my way is not the correct way to determine device
> characteristics.
Your way sounds correct, but the driver code that sets the parameter
constraints might not be, or the device really doesn't support 24 bits
at the sample rate you've set.
Regards,
Clemens
next prev parent reply other threads:[~2013-02-20 20:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-17 2:39 Discovery of device characteristics Tim Hewett
2013-02-20 20:28 ` Clemens Ladisch [this message]
2013-02-20 21:38 ` Tim Hewett
2013-02-21 7:43 ` Clemens Ladisch
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=512531DC.6010701@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=tghewett2@onetel.com \
/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.