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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, May 13, 2016 at 02:20:57PM +0200, Martin Sperl wrote:
> > On 13.05.2016, at 12:54, Mark Brown <broonie@xxxxxxxxxx> 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.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux