summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/soc/sof/intel/hda-stream.c4
-rw-r--r--sound/soc/sof/intel/hda.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/hda-stream.c b/sound/soc/sof/intel/hda-stream.c
index 47eff161c60e..39f4212bde4b 100644
--- a/sound/soc/sof/intel/hda-stream.c
+++ b/sound/soc/sof/intel/hda-stream.c
@@ -500,6 +500,7 @@ int hda_dsp_stream_init(struct snd_sof_dev *sdev)
struct hdac_ext_stream *stream;
struct hdac_stream *hstream;
struct pci_dev *pci = to_pci_dev(sdev->dev);
+ struct sof_intel_hda_dev *sof_hda = bus_to_sof_hda(bus);
int sd_offset;
int i, num_playback, num_capture, num_total, ret;
u32 gcap;
@@ -657,6 +658,9 @@ int hda_dsp_stream_init(struct snd_sof_dev *sdev)
list_add_tail(&hstream->list, &bus->stream_list);
}
+ /* store total stream count (playback + capture) from GCAP */
+ sof_hda->stream_max = num_total;
+
return 0;
}
diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h
index 3799a3518106..7cb2fb92c4eb 100644
--- a/sound/soc/sof/intel/hda.h
+++ b/sound/soc/sof/intel/hda.h
@@ -383,6 +383,9 @@ struct sof_intel_hda_dev {
/* if position update IPC needed */
u32 no_ipc_position;
+ /* the maximum number of streams (playback + capture) supported */
+ u32 stream_max;
+
int irq;
/* DMIC device */