[Sound-open-firmware] [PATCH 1/2] topology: add token for buffer type.
Keyon Jie
yang.jie at linux.intel.com
Thu Feb 8 13:58:18 CET 2018
On 2018年01月31日 04:46, Liam Girdwood wrote:
> On Tue, 2018-01-30 at 15:29 +0800, Keyon Jie wrote:
>> Add buffer token SOF_TKN_BUF_TYPE, for different buffer type.
>> Add a new W_BUFFER_DMA function which will allocate buffer with
>> DMA type.
>>
>> Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
>> ---
>> topology/m4/local.m4 | 22 ++++++++++++++++++++++
>> topology/sof/tokens.m4 | 1 +
>> 2 files changed, 23 insertions(+)
>>
>> diff --git a/topology/m4/local.m4 b/topology/m4/local.m4
>> index ad72a11..974ae6c 100644
>> --- a/topology/m4/local.m4
>> +++ b/topology/m4/local.m4
>> @@ -52,6 +52,28 @@ define(`W_BUFFER',
>> ` tokens "sof_buffer_tokens"'
>> ` tuples."word" {'
>> ` SOF_TKN_BUF_SIZE' STR($2)
>> +` SOF_TKN_BUF_TYPE' STR(0)
>> +` }'
>> +`}'
>> +`SectionData."'N_BUFFER($1)`_data" {'
>> +` tuples "'N_BUFFER($1)`_tuples"'
>> +`}'
>> +`SectionWidget."'N_BUFFER($1)`" {'
>> +` index "'PIPELINE_ID`"'
>> +` type "buffer"'
>> +` no_pm "true"'
>> +` data ['
>> +` "'N_BUFFER($1)`_data"'
>> +` ]'
>> +`}')
>> +
>> +dnl W_BUFFER_DMA(name, size)
>
> cant we just add an arg to W_BUFFER for memory type ?
I planed to use that, but it need change too much(in almost each
platform .m4 files)
add one W_BUFFER_DMA here is friendly for BYT/CHT/BDW/HSW, and even for
normal buffers(non-dma ones, buffers inside FW).
Thanks,
~Keyon
>
>> +define(`W_BUFFER_DMA',
>> +`SectionVendorTuples."'N_BUFFER($1)`_tuples" {'
>> +` tokens "sof_buffer_tokens"'
>> +` tuples."word" {'
>> +` SOF_TKN_BUF_SIZE' STR($2)
>> +` SOF_TKN_BUF_TYPE' STR(1)
>> ` }'
>> `}'
>> `SectionData."'N_BUFFER($1)`_data" {'
>> diff --git a/topology/sof/tokens.m4 b/topology/sof/tokens.m4
>> index 704effc..4e7d04f 100644
>> --- a/topology/sof/tokens.m4
>> +++ b/topology/sof/tokens.m4
>> @@ -11,6 +11,7 @@
>>
>> SectionVendorTokens."sof_buffer_tokens" {
>> SOF_TKN_BUF_SIZE "100"
>> + SOF_TKN_BUF_TYPE "101"
>> }
>>
>> SectionVendorTokens."sof_dai_tokens" {
> _______________________________________________
> Sound-open-firmware mailing list
> Sound-open-firmware at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
>
More information about the Sound-open-firmware
mailing list