Skip to content

Commit 4b0b5f7

Browse files
committed
ASoC: SOF/soundwire: re-add substream in params_stream structure
An earlier simplification to only pass the direction is no longer suitable, all the ACE2.x HDaudio DMA management relies on access to the substream structure. This patch is an iso-functionality change, the HDaudio DMA parts will be provided separately. Signed-off-by: Pierre-Louis Bossart <[email protected]>
1 parent 85b1e78 commit 4b0b5f7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

drivers/soundwire/intel.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -643,15 +643,15 @@ intel_pdi_alh_configure(struct sdw_intel *sdw, struct sdw_cdns_pdi *pdi)
643643
}
644644

645645
static int intel_params_stream(struct sdw_intel *sdw,
646-
int stream,
646+
struct snd_pcm_substream *substream,
647647
struct snd_soc_dai *dai,
648648
struct snd_pcm_hw_params *hw_params,
649649
int link_id, int alh_stream_id)
650650
{
651651
struct sdw_intel_link_res *res = sdw->link_res;
652652
struct sdw_intel_stream_params_data params_data;
653653

654-
params_data.stream = stream; /* direction */
654+
params_data.substream = substream;
655655
params_data.dai = dai;
656656
params_data.hw_params = hw_params;
657657
params_data.link_id = link_id;
@@ -709,7 +709,7 @@ static int intel_hw_params(struct snd_pcm_substream *substream,
709709
dai_runtime->hw_params = params;
710710

711711
/* Inform DSP about PDI stream number */
712-
ret = intel_params_stream(sdw, substream->stream, dai, params,
712+
ret = intel_params_stream(sdw, substream, dai, params,
713713
sdw->instance,
714714
pdi->intel_alh_id);
715715
if (ret)
@@ -781,7 +781,7 @@ static int intel_prepare(struct snd_pcm_substream *substream,
781781
sdw_cdns_config_stream(cdns, ch, dir, dai_runtime->pdi);
782782

783783
/* Inform DSP about PDI stream number */
784-
ret = intel_params_stream(sdw, substream->stream, dai,
784+
ret = intel_params_stream(sdw, substream, dai,
785785
dai_runtime->hw_params,
786786
sdw->instance,
787787
dai_runtime->pdi->intel_alh_id);

include/linux/soundwire/sdw_intel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
* firmware.
183183
*/
184184
struct sdw_intel_stream_params_data {
185-
int stream;
185+
struct snd_pcm_substream *substream;
186186
struct snd_soc_dai *dai;
187187
struct snd_pcm_hw_params *hw_params;
188188
int link_id;

sound/soc/sof/intel/hda.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static int sdw_params_stream(struct device *dev,
9494
struct sdw_intel_stream_params_data *params_data)
9595
{
9696
struct snd_soc_dai *d = params_data->dai;
97-
struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget(d, params_data->stream);
97+
struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget(d, params_data->substream->stream);
9898
struct snd_sof_dai_config_data data = { 0 };
9999

100100
data.dai_index = (params_data->link_id << 8) | d->id;

0 commit comments

Comments
 (0)