Commit e8e55dbe authored by Keyon Jie's avatar Keyon Jie Committed by Mark Brown

ASoC: SOF: Intel: hda-stream: store stream capabilities

Add stream_max into struct sof_intel_hda_dev to store the total hda
stream number that the platform can support, and initialize it at
stream_init.

This can be used later e.g. for stream bitmask.
Signed-off-by: default avatarKeyon Jie <yang.jie@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6d60a39e
...@@ -500,6 +500,7 @@ int hda_dsp_stream_init(struct snd_sof_dev *sdev) ...@@ -500,6 +500,7 @@ int hda_dsp_stream_init(struct snd_sof_dev *sdev)
struct hdac_ext_stream *stream; struct hdac_ext_stream *stream;
struct hdac_stream *hstream; struct hdac_stream *hstream;
struct pci_dev *pci = to_pci_dev(sdev->dev); 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 sd_offset;
int i, num_playback, num_capture, num_total, ret; int i, num_playback, num_capture, num_total, ret;
u32 gcap; u32 gcap;
...@@ -657,6 +658,9 @@ int hda_dsp_stream_init(struct snd_sof_dev *sdev) ...@@ -657,6 +658,9 @@ int hda_dsp_stream_init(struct snd_sof_dev *sdev)
list_add_tail(&hstream->list, &bus->stream_list); list_add_tail(&hstream->list, &bus->stream_list);
} }
/* store total stream count (playback + capture) from GCAP */
sof_hda->stream_max = num_total;
return 0; return 0;
} }
......
...@@ -383,6 +383,9 @@ struct sof_intel_hda_dev { ...@@ -383,6 +383,9 @@ struct sof_intel_hda_dev {
/* if position update IPC needed */ /* if position update IPC needed */
u32 no_ipc_position; u32 no_ipc_position;
/* the maximum number of streams (playback + capture) supported */
u32 stream_max;
int irq; int irq;
/* DMIC device */ /* DMIC device */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment