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: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
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;
list_add_tail(&hstream->list, &bus->stream_list);
}
+ /* store total stream count (playback + capture) from GCAP */
+ sof_hda->stream_max = num_total;
+
return 0;
}
/* if position update IPC needed */
u32 no_ipc_position;
+ /* the maximum number of streams (playback + capture) supported */
+ u32 stream_max;
+
int irq;
/* DMIC device */