Re: [PATCH 08/19] ASoC: amd: ps: add soundwire dma driver dma ops

From: Mukunda,Vijendar
Date: Mon Jan 16 2023 - 01:56:10 EST


On 13/01/23 22:35, Pierre-Louis Bossart wrote:
>>>> + sdw_data->sdw_stream[stream_id] = substream;
>>>> + size = params_buffer_bytes(params);
>>>> + period_bytes = params_period_bytes(params);
>>>> + sdw_stream_data->dma_addr = substream->runtime->dma_addr;
>>>> + sdw_stream_data->num_pages = (PAGE_ALIGN(size) >> PAGE_SHIFT);
>>>> + acp63_config_dma(sdw_stream_data, stream_id);
>>>> + ret = acp63_configure_sdw_ringbuffer(sdw_stream_data->acp_base, stream_id, size);
>>>> + if (ret) {
>>>> + dev_err(component->dev, "Invalid channel type\n");
>>>> + return -EINVAL;
>>>> + }
>>>> + switch (stream_id) {
>>>> + case ACP_SDW_AUDIO_TX:
>>>> + water_mark_size_reg = ACP_AUDIO_TX_INTR_WATERMARK_SIZE;
>>>> + irq_mask = BIT(ACP_AUDIO_TX_THRESHOLD);
>>>> + acp_ext_intr_cntl_reg = ACP_EXTERNAL_INTR_CNTL;
>>>> + break;
>>> so there's ONE resource to deal with external codecs? How does this work
>>> if you have a headset codec and an amplifier?
>> Are you referring to playing a same stream over headset codec and
>> amplifier?
>> It's all about channel selection from DMA perspective.
>> We have tested speaker aggregation and headset playback use cases.
> No, I wasn't asking about playing the same content to different sinks.
>
> I was referring to playing/recording different content to/from different
> devices.
Yes , it's possible. We have tested parallel RX and TX streams.
Please refer patch 2 review comments reply.

For ex, speaker playback we are using Audio_TX Channel whereas for
Headset playback we are using Headset_Tx channel.
>
> Even when interfacing with a single device, there are interesting
> topologies in the SDCA spec that would require multiple DMA transfers
> conveying unrelated content (or processed content from the same source).
>