SoundWire: aggregation fixes#4800
Closed
plbossart wants to merge 12 commits intothesofproject:topic/sof-devfrom
Closed
SoundWire: aggregation fixes#4800plbossart wants to merge 12 commits intothesofproject:topic/sof-devfrom
plbossart wants to merge 12 commits intothesofproject:topic/sof-devfrom
Conversation
…re DAIs" This reverts commit 699e146. Don't reset device_count as we will use the multi-gateway firmware configuration. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Each stream needs a dma_config_tlv. We will handle multi dma_config_tlv in the follow up commits. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
sof_ipc4_dma_config_tlv{} is required for ACE2.x. And the
dma_stream_channel_map.mapping in sof_ipc4_dma_config{} should be
the same as the mapping in sof_ipc4_alh_configuration_blob{}.
The device id is equal to node_id which is 'node_type | stream_tag - 1',
The purposes of device id is to map DMA tlv.
The patch copies the mapping from sof_ipc4_alh_configuration_blob{}
to sof_ipc4_dma_config_tlv{} to meet the firmware's requirement.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
…for first CPU DAI" This reverts commit f8ba62a. The SoundWire aggregated solution was to use one DMA on multiple links. But, the solution changed to use one DMA for each link. It means that we should assign HDaudio stream_tag for each cpu_dai. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Set ipc4_copier->data.gtw_cfg.config_length dynamically based on blob->alh_cfg.device_count to align with the other OS. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
This reverts commit 7f9512a. commit 7f9512a ("ASoC: SOF: Intel: hda-dai-ops: fix HDaudio link format") added up all DAIs channels for SoundWire aggregation mode. That was correct because we used a DMA for all DAIs. But, it is not valid anymore after we use a DMA for each DAI. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
We always use the lowest N channels of stream. So, set ch_mask to GENMASK(params_channels(params) - 1, 0). Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Starting with Lunar Lake, the notion of ALH is mostly irrelevant, since the HDaudio DMAs are used. However the firmware still relies on an 'ALH gateway' with a 'node_id' based on the same formula. This patch in isolation has no functional impact, it's only when the ASoC parts use it that we will see a changed behavior. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
We need to be able to set the dai config differently for SoundWire. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Add intel_alh_id to set the expected gateway node_id in a follow-up patch. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The node_id value needs to be handled specifically for ALH. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The firmware does not really care about the exact values used for the DMA TLV 'device' field, the only requirement is that each DMA TLV contains a unique number. In practice, there's no need to be creative, so this patch uses the same conventions used by reference firmware and the other OS. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
bardliao
reviewed
Feb 1, 2024
| */ | ||
| dma_config = &ipc4_copier->dma_config_tlv[i].dma_config; | ||
| dma_config->dma_stream_channel_map.mapping[0].device = | ||
| blob->alh_cfg.mapping[i].device; |
Collaborator
There was a problem hiding this comment.
This should be invert.
I.e.
- dma_config->dma_stream_channel_map.mapping[0].device =
- blob->alh_cfg.mapping[i].device;
+ blob->alh_cfg.mapping[i].device =
+ dma_config->dma_stream_channel_map.mapping[0].device;|
@plbossart Will you create a new PR to replace this one? |
Member
Author
@mengdonglin see #4804 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends the initial work done by @bardliao in PR #4790
The only changes are the conventions used:
The gateway node_id is the intel_alh_id for all generations, even if it's completely useless for LNL+ (link_id << 4 + pdi)
The 'device' in the DMA_TLV required for LNL+ is the dai_index (link_id << 8 | pdi)