[Sound-open-firmware] [PATCH v2 2/3] dai: set dai dma burst_elems according to slot number

Jie, Yang yang.jie at intel.com
Tue Dec 19 15:31:24 CET 2017


>-----Original Message-----
>From: Liam Girdwood [mailto:liam.r.girdwood at linux.intel.com]
>Sent: Tuesday, December 19, 2017 10:22 PM
>To: Jie, Yang <yang.jie at intel.com>; Pierre-Louis Bossart <pierre-
>louis.bossart at linux.intel.com>; Keyon Jie <yang.jie at linux.intel.com>; sound-
>open-firmware at alsa-project.org
>Subject: Re: [Sound-open-firmware] [PATCH v2 2/3] dai: set dai dma burst_elems
>according to slot number
>
>On Tue, 2017-12-19 at 14:11 +0000, Jie, Yang wrote:
>> > > We should set burst_elems for dma peripheral dev copy, for
>> > > dai/ssp, it should be set to valid slot number, otherwise, the dma
>> > > may copy in wrong burst size and data will run with wrong speed.
>> >
>> > I don't think the commit message reflects the code, it's really the
>> > total number of active slots and not the slot number(s) that we care about,
>right?
>>
>> This is a good topic. At the moment, we are using topology file to
>> configure dai, e.g. DAI_TDM(2, 20, 3, 3), which set num_slots(corresponding to
>'slot number(s)'
>> you mentioned?) to 2 and tx slot mask to 0x3(slot0and slot1 enabled,
>> corresponding to 'the total number' in your context?), so they are same for us
>actually at this case.
>>
>> But imagine that if we set tx slot mask to, e.g. 0x1, should we set
>> burst_elems to
>> 1 or 2? I tend to set 1 at this case, but not 100% sure about it yet,
>> Maybe we need experiment and fix bugs if exist.
>>
>> So back to your question, I think the answer is yes, using active
>> slots number may be more accurate, though we need experiment on that later.
>
>Keyon, can you submit a patch that make this obvious by means of a code
>comment or variable name change.

Sure thing. How about changing burst_elems to data_item_num, or
valid_item_num?

Thanks,
~Keyon

>
>Thanks
>
>Liam


More information about the Sound-open-firmware mailing list