Re: [RFC PATCH] ASoC: pcm512x: Implement the set_bclk_ratio interface

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

 




On 1/15/19 6:19 AM, Dimitris Papavasiliou wrote:
On Tue, Jan 15, 2019 at 10:08 AM Peter Rosin <peda@xxxxxxxxxx> wrote:
On 2019-01-14 18:36, Pierre-Louis Bossart wrote:
You should perhaps check if (ratio >= 1 && ratio <= 256) prior to
accepting a divider that can't be programmed? But maybe that's enforced
somewhere else? And perhaps the sanity check should be even stricter?
Yes it should be stricter with a power of two only. I tried really hard
to make this codec work with ratios of 50 (and a 19.2 MHz mclk) on an Up
board and it's just not possible, probably not supported by hardware.
Disallowing anything but powers of two just because 50 doesn't work seems
pretty wild. According to docs I think 48 should work just fine.

Section 8.3.2 Audio Data Interface page 16.
http://www.ti.com/lit/ds/symlink/pcm5142.pdf

Or?
According to the datasheet[1], you can program any divider between 1
and 256, via register 33 (page 80), but, as Peter points out, in the
description of the audio data interface (page 15), only the values 32,
48, 64, 128, 256 are mentioned as permissible.  So one approach would
be to restrict the values accepted by the callback to this set.  Since
the datasheet is not terribly clear on whether only these are allowed,
and since the ratio is set explicitly in the machine driver, it could
be argued that it would be preferable to allow all values that can be
set in the register, to minimize the risk of needlessly rejecting
valid configurations.

[1] http://www.ti.com/lit/ds/symlink/pcm5121.pdf
I meant multiple of 16, sorry. multiples of 25/50 commonly used with other codecs will not work.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux