From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: "Emmanuel Fusté"
<emmanuel.fuste-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
Cc: kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Jaroslav Kysela <perex-/Fr2/VpizcU@public.gmane.org>,
Takashi Iwai <tiwai-IBi9RG/b67k@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Matthias Reichl <hias-vtPv7MOkFPkAvxtiuMwx3w@public.gmane.org>,
Florian Meier <florian.meier-oZ8rN/sblLk@public.gmane.org>
Subject: Re: [alsa-devel] [PATCH 1/2] ASoC: pcm5102a: Add support for PCM5102A codec
Date: Mon, 23 May 2016 23:29:05 +0100 [thread overview]
Message-ID: <20160523222905.GG8206@sirena.org.uk> (raw)
In-Reply-To: <312f8476-a437-04d9-3d16-38d7c7c233ad-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2602 bytes --]
On Mon, May 23, 2016 at 10:37:18PM +0200, Emmanuel Fusté wrote:
> All the parameters are only rate and format.
Off the top of my head clocking constraints are another thing we could
know...
> And even rate is implementation dependent. Knowing the name of the hardware
> give nothing. You still have to look at the schematic or look at the board
> to know valid rates.
Fortunately we have mechanisms for constraining things between multiple
devices, it's not like this is a property unique to registerless CODECs.
> Yes this push more effort on the DT side, but I think this is better to
> describe in DT the actual "I2S only" hardware capabilities of the
> implementation of the device guided by wiring or design choice.
> Doing code cut&paste and two static assignment adjustment to create a "new"
> driver is completely overkill and nonflexible.
If someone was so motivated they could also make one big driver with a
table of per device constraints in it, it doesn't *have* to be separate
files.
> /* pcm5102a in HW mode with external SCK (4wire mode)
> * at 128fs, 192fs or 256fs
> */
> pcm5102a-4w: pcm5102a {
> compatible = "simple-i2s-codec";
> rate = <SNDRV_PCM_RATE_8000_192000>;
> format = < SNDRV_PCM_FMTBIT_S16_LE
> |SNDRV_PCM_FMTBIT_S24_LE
> |SNDRV_PCM_FMTBIT_S32_LE>;
> };
Those defines look awfully Linux specific...
> /* pcm5102a in HW mode with PLL on BCK (3wire mode)
> * 16to384khz but only with bck rate of 64fs
> */
> pcm5102a-4w: pcm5102a {
> compatible = "simple-i2s-codec";
> rate = <SNDRV_PCM_RATE_8000_192000
> ^ SNDRV_PCM_RATE_8000>;
> format = <SNDRV_PCM_FMTBIT_S32_LE>;
> };
...and another way of doing the multiple options would be to have the
binding be per device and use the clock binding to describe where the
master clock comes from which then allows us to start and stop that
clock on demand and possibly (as our clock API integration improves)
constrain based on that. It may be that in future or perhaps even just
for other users of the same board the set of constraints is different
(perhaps they choose some other clock rate for something in the system
due to other constraints which lets the master clock vary more for
example).
It's also just more work for the second person to come across the
device, at best they have to go and type in the same data over again.
A brief look at the datasheet suggests that there's also a few GPIO
controls we might have wired up where we can expose them and of course
regulators we may want to control in some systems.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-05-23 22:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-13 9:14 [PATCH 0/2] ASoC: bcm2835: add support for hifiberry-dac kernel-TqfNSX0MhmxHKSADF0wUEw
[not found] ` <1463130853-25096-1-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2016-05-13 9:14 ` [PATCH 1/2] ASoC: pcm5102a: Add support for PCM5102A codec kernel-TqfNSX0MhmxHKSADF0wUEw
[not found] ` <1463130853-25096-2-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2016-05-16 16:26 ` Rob Herring
2016-05-22 21:29 ` [alsa-devel] " Emmanuel Fusté
[not found] ` <34ab107e-10dc-fbd3-28d1-203c6411851c-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
2016-05-23 17:08 ` Mark Brown
[not found] ` <20160523170853.GB8206-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-05-23 20:37 ` Emmanuel Fusté
[not found] ` <312f8476-a437-04d9-3d16-38d7c7c233ad-QFKgK+z4sOrR7s880joybQ@public.gmane.org>
2016-05-23 22:29 ` Mark Brown [this message]
2016-05-24 14:44 ` Ricard Wanderlof
2016-05-24 22:33 ` Emmanuel Fusté
2016-05-13 9:14 ` [PATCH 2/2] ASoC: Add support for HifiBerry DAC kernel-TqfNSX0MhmxHKSADF0wUEw
[not found] ` <1463130853-25096-3-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2016-05-13 10:54 ` Mark Brown
[not found] ` <20160513105409.GB22038-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-05-13 12:20 ` Martin Sperl
[not found] ` <C139252A-23AC-4C37-A5E5-E0D7AF1DCC89-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2016-05-13 13:21 ` Mark Brown
2016-05-13 16:21 ` Martin Sperl
[not found] ` <20160513132113.GP22038-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-05-20 12:28 ` kernel-TqfNSX0MhmxHKSADF0wUEw
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=20160523222905.GG8206@sirena.org.uk \
--to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=emmanuel.fuste-QFKgK+z4sOrR7s880joybQ@public.gmane.org \
--cc=florian.meier-oZ8rN/sblLk@public.gmane.org \
--cc=hias-vtPv7MOkFPkAvxtiuMwx3w@public.gmane.org \
--cc=kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org \
--cc=linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=perex-/Fr2/VpizcU@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tiwai-IBi9RG/b67k@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox