[PATCH 2/2] ASoC: Add support for HifiBerry DAC

Mark Brown broonie at kernel.org
Fri May 13 06:21:13 PDT 2016


On Fri, May 13, 2016 at 02:20:57PM +0200, Martin Sperl wrote:
> > On 13.05.2016, at 12:54, Mark Brown <broonie at kernel.org> wrote:

> > You could almost use simple-card here but the BCLK ratio requirement is
> > probably a bit much, I'm not immediately seeing a nice way to specify
> > the ratio there since it depends on the sample width.

> Actually it is just: <sample-width> * <number of channels>
> where number of channels is fixed to 2 for bcm2835-i2s.

> So maybe that already happens automatically in the framework?

No, it's not handled.  Lots of devices don't care or have different
requirements (eg, 256fs).  The tricky bit with specifying it is that the
ratio depends on the sample width here but it might depend on something
else with another device, or the number of channels might vary.  That
should be doable with DT but it feels like more trouble than it's
reasonable to ask you to take here.

> Something like this could get added to the core?
> Is there interest in getting something like this?

> Could look like this:
> bclk-ratios = 
>   /* for 96kHz at 16bit/channel use bclk-ratio 40 */
>   <96000 16 40>, 
>   /* for 48kHz at 32bit/channel use bclk-ratio 80 */
>   <48000 16 80>,
>   /* for any (other) sample frequency at 16 bit use bclk-ratio 32 */
>   <0 16 32>,
>   /* for any (other) sample frequency at 32 bit use bclk-ratio 64 */
>   <0 32 64>;

> but there could also be other approaches as well,
> how this could get described in the device tree.

You may well end up with something like that, yeah.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-rpi-kernel/attachments/20160513/2d2b676a/attachment.sig>


More information about the linux-rpi-kernel mailing list