Skip to content

Commit aeccfd5

Browse files
committed
ASoC: SOF: hda-stream: add and strore hda stream number
Add stream_total into sof_intel_hda_dev to store the total hda stream number that the platform can support, and initialize it at stream_init. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
1 parent d5113b0 commit aeccfd5

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎sound/soc/sof/intel/hda-stream.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ int hda_dsp_stream_init(struct snd_sof_dev *sdev)
500500
structhdac_ext_stream*stream;
501501
structhdac_stream*hstream;
502502
structpci_dev*pci=to_pci_dev(sdev->dev);
503+
structsof_intel_hda_dev*sof_hda=bus_to_sof_hda(bus);
503504
intsd_offset;
504505
inti, num_playback, num_capture, num_total, ret;
505506
u32gcap;
@@ -657,6 +658,9 @@ int hda_dsp_stream_init(struct snd_sof_dev *sdev)
657658
list_add_tail(&hstream->list, &bus->stream_list);
658659
}
659660

661+
/* store the total playback + capture stream number */
662+
sof_hda->stream_total=num_total;
663+
660664
return0;
661665
}
662666

‎sound/soc/sof/intel/hda.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ struct sof_intel_hda_dev {
367367
/* if position update IPC needed */
368368
u32no_ipc_position;
369369

370+
/* the total playback + capture stream number */
371+
u32stream_total;
372+
370373
intirq;
371374

372375
/* DMIC device */

0 commit comments

Comments
 (0)