[alsa-devel] [PATCH 2/2] ASoC: simple-card: Add support for samplerate and samplewidth constraints
Jyri Sarha
jsarha at ti.com
Tue Mar 3 11:01:20 CET 2015
On 03/02/2015 09:35 PM, Pierre-Louis Bossart wrote:
> Hi Jyri,
>
> On 3/2/15 8:14 AM, Jyri Sarha wrote:
>>
>> Optional dai-link subnode properties:
>>
>> +- samplewidth-constraints : List of integers describing supported
>> + sample widths in number of bits.
>
> There are quite a few platforms where the number of bits for valid audio
> bits differs from the number of bits per slot, e.g. 24 bits with 25 bit
> slots, or 24 bits in 32 bit slots. How would this be represented? This
> concept is present for the TDM case but not the simple one.
> -Pierre
As these are dai-link level properties the idea is to set constraints to
sample-width on the digital audio link, usually i2s. That is why the
constraint is set based on sample-width and not physical width.
The number if significant bits in the sample-word should in a normal
case be a property of the codec, if such a property is needed. On the
other hand the limits for the physical layout in the system memory are
usually set by the platform driver (= DMA HW), so such a property should
- in a normal case - go to cpu-dai node. Since these cases can usually
be associated to either end of the link, there should be no need for
such properties in the machine driver.
I am not sure what you have in mind with the TDM case. In some cases a
similar constraint property for number of channels could help.
Best regards,
Jyri
>
>> +- rate-constraints : List of integers describing supported
>> + sample samplerates in Hz.
>> - format : CPU/CODEC common audio format.
>> "i2s", "right_j", "left_j" , "dsp_a"
>
More information about the Alsa-devel
mailing list