From: Lars-Peter Clausen <lars@metafoo.de>
To: "Austin, Brian" <Brian.Austin@cirrus.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH] ASoC: cs42l73: Don't mix SNDRV_PCM_RATE_KNOT with specific rates
Date: Tue, 04 Feb 2014 22:01:13 +0100 [thread overview]
Message-ID: <52F15519.7090109@metafoo.de> (raw)
In-Reply-To: <A40422ED-1EEB-4A09-A550-0AAAAA89464D@cirrus.com>
On 02/04/2014 09:30 PM, Austin, Brian wrote:
>> On Feb 4, 2014, at 13:55, "Lars-Peter Clausen" <lars@metafoo.de> wrote:
>>
>> SNDRV_PCM_RATE_KNOT means that the device can support rates that can not be
>> expressed using the rate bits. The driver will provide a list of those rates
>> specified through constraints. Any rate bits that are set in the rates mask will
>> be ignored. So setting other rate bits besides SNDRV_PCM_RATE_KNOT wont have any
>> effect, but might be confusing to the casual reader, so remove them.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>
> I don't see how this makes it any less confusing to the casual reader. I think the
> define works well in the descriptive sense. maybe a comment about what
KNOT really
> means instead of just using a non-rate define?
The thing is SNDRV_PCM_RATE_8000_48000 does something if
SNDRV_PCM_RATE_{KNOT,CONTINUOUS} is not set, but does nothing at all if
either of them is set. While when reading the code it will, in my opinion,
give the impression that the rates that are specified by
SNDRV_PCM_RATE_8000_48000 are definitely among the supported rates and
somewhere else additional rates are specified as well. But this is not the
case all the supported rates need to be specified somewhere else, e.g. by a
rate list constraint. I find this confusing when casually reading the code.
And this is the only driver that does it.
Also there was a bug, which is now fixed, where additionally specifying
rates in the rate bitmap when KNOT or CONTINUOUS was set did something, but
did the wrong thing and caused additional rates which where outside of the
range of the rates set in the bitmap to be ignored. Better avoid that by not
mixing KNOT or CONTINUOUS with other rate bits.
- Lars
next prev parent reply other threads:[~2014-02-04 21:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 19:55 [PATCH] ASoC: cs42l73: Don't mix SNDRV_PCM_RATE_KNOT with specific rates Lars-Peter Clausen
2014-02-04 20:30 ` Austin, Brian
2014-02-04 21:01 ` Lars-Peter Clausen [this message]
2014-02-04 21:49 ` Eliot Blennerhassett
2014-02-05 7:08 ` Takashi Iwai
2014-02-05 7:08 ` Takashi Iwai
2014-02-05 14:35 ` Austin, Brian
2014-02-05 15:23 ` Lars-Peter Clausen
2014-02-05 15:47 ` Austin, Brian
2014-02-05 15:48 ` Austin, Brian
2014-02-05 15:52 ` Mark Brown
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=52F15519.7090109@metafoo.de \
--to=lars@metafoo.de \
--cc=Brian.Austin@cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.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.