62582341 | 19-Oct-2022 |
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
ALSA/ASoC: hda: move SPIB/DRMS functionality from ext layer
The SPIB and DRMS capabilities are orthogonal to the DSP enablement and can be used whether the stream is coupled or not.
The existing co
ALSA/ASoC: hda: move SPIB/DRMS functionality from ext layer
The SPIB and DRMS capabilities are orthogonal to the DSP enablement and can be used whether the stream is coupled or not.
The existing code partitioning makes limited sense, the capabilities are parsed at the sound/hda level but helpers are located in sound/hda/ext.
This patch moves all the SPIB/DRMS functionality to the sound/hda layer. This reduces the complexity of the sound/hda/ext layer which is now limited to handling the multi-link extensions and stream coupling/decoupling helpers.
Note that this is an iso-functionality code move and rename, the HDaudio legacy driver would need additional changes to make use of these capabilities.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
f9002510 | 19-Oct-2022 |
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
ALSA: hda: hdac_ext_controller: remove useless loop
commit 0b00a5615dc40 ("ALSA: hdac_ext: add hdac extended controller") introduced a for() loop on the number of HDaudio codecs that seems completel
ALSA: hda: hdac_ext_controller: remove useless loop
commit 0b00a5615dc40 ("ALSA: hdac_ext: add hdac extended controller") introduced a for() loop on the number of HDaudio codecs that seems completely useless.
a) the body of the loop does not make use of the loop index, and b) the LSDIID register is related to the SDI line, so there can only be one codec per multi-link descriptor.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
26646c19 | 19-Oct-2022 |
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
ALSA: hda: ext: reduce ambiguity between 'multi-link' and 'link' DMA
My esteemed colleagues keep using the same words for different things.
The multi-link structure needs to be handled whether the
ALSA: hda: ext: reduce ambiguity between 'multi-link' and 'link' DMA
My esteemed colleagues keep using the same words for different things.
The multi-link structure needs to be handled whether the DSP is enabled or not.
The host and link DMAs are only relevant when the DSP is enabled.
Things get convoluted when there's an ambiguity between the LOSIDV settings in the multi-link register space and the selection of the stream_tag for the link DMA.
Clarify with a rename that the static functions used are related to the host and link DMAs only.
No functionality change, pure rename.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
7fa403f2 | 19-Oct-2022 |
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
ALSA/ASoC: hda: ext: add 'bus' prefix for multi-link stream setting
All the helpers dealing with multi-link configurations are located in the hdac_ext_controller.c, except the two set/clear routines
ALSA/ASoC: hda: ext: add 'bus' prefix for multi-link stream setting
All the helpers dealing with multi-link configurations are located in the hdac_ext_controller.c, except the two set/clear routines that modify the LOSIDV registers.
For consistency, move the two helpers and add the 'bus' prefix. One could argue that the 'ml' prefix might be more relevant but that would be a larger code change.
No functionality change, just move and rename.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
00b6cd95 | 19-Oct-2022 |
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
ALSA/ASoC: hda: ext: remove 'link' prefix for stream-related operations
We should only use 'link' in the context of multi-link configurations. Streams are configured from a different register space
ALSA/ASoC: hda: ext: remove 'link' prefix for stream-related operations
We should only use 'link' in the context of multi-link configurations. Streams are configured from a different register space and are not dependent on link except for LOSIDV settings.
Not functionality change, just pure rename.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
7f05ca9a | 19-Oct-2022 |
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
ALSA/ASoC: hda: ext: add 'ext' prefix to snd_hdac_link_free_all
No functionality change, just prefix addition to clearly identify that the helper only applies to the 'ext' part for Intel platforms.
ALSA/ASoC: hda: ext: add 'ext' prefix to snd_hdac_link_free_all
No functionality change, just prefix addition to clearly identify that the helper only applies to the 'ext' part for Intel platforms.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
eebaa6b0 | 19-Oct-2022 |
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
ALSA: hda: ext: hda_ext_controller: use hlink variable/parameter
Follow the convention and use hlink for consistency. No functionality change.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.boss
ALSA: hda: ext: hda_ext_controller: use hlink variable/parameter
Follow the convention and use hlink for consistency. No functionality change.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
c6fe6be6 | 19-Sep-2022 |
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
ALSA: hda: ext: remove always-true conditions on host and link release
By construction a host and link DMA are always decoupled. This decoupling happens in the assign() phase. There's no point in ch
ALSA: hda: ext: remove always-true conditions on host and link release
By construction a host and link DMA are always decoupled. This decoupling happens in the assign() phase. There's no point in checking if the two parts are decoupled, this is by-design always-true.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20220919121041.43463-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
ac3467ad | 19-Sep-2022 |
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
ALSA: hda: ext: fix locking in stream_release
The snd_hdac_ext_stream_release() routine uses the bus reg_lock, but releases it before calling snd_hdac_stream_release() where the bus reg_lock is take
ALSA: hda: ext: fix locking in stream_release
The snd_hdac_ext_stream_release() routine uses the bus reg_lock, but releases it before calling snd_hdac_stream_release() where the bus reg_lock is taken again.
This creates a timing window where the link stream release could test an invalid 'opened' boolean status and fail to recouple the host and link parts.
Fix by exposing a locked version of snd_hdac_stream_release() and use it without releasing the spinlock.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20220919121041.43463-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
53f4f6b4 | 19-Sep-2022 |
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
ALSA: hda: ext: simplify logic for stream assignment
The logic is needlessly complicated, the basic rule is:
The host streams can be found by checking the 'opened' boolean. The link streams can be
ALSA: hda: ext: simplify logic for stream assignment
The logic is needlessly complicated, the basic rule is:
The host streams can be found by checking the 'opened' boolean. The link streams can be found by checking the 'link_locked' boolean.
Once a stream is found, it can be unconditionally decoupled. The snd_hdac_ext_stream_decouple_locked() routine will make sure the register status is modified as needed and the 'decoupled' boolean set.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20220919121041.43463-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
0839a04e | 19-Sep-2022 |
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
ALSA: hda: Use hdac_ext prefix in snd_hdac_stream_free_all() for clarity
Make sure there's no ambiguity on layering with the appropriate prefix added.
Pure rename, no functionality changed.
Signed
ALSA: hda: Use hdac_ext prefix in snd_hdac_stream_free_all() for clarity
Make sure there's no ambiguity on layering with the appropriate prefix added.
Pure rename, no functionality changed.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20220919121041.43463-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
18afcf90 | 22-Aug-2022 |
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
ALSA: hda: cleanup definitions for multi-link registers
For some reason two masks are used without the AZX prefix, and the pattern MLCLT should be ML_LCTL for consistency.
Pure rename, no functiona
ALSA: hda: cleanup definitions for multi-link registers
For some reason two masks are used without the AZX prefix, and the pattern MLCLT should be ML_LCTL for consistency.
Pure rename, no functionality change.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220822190044.170495-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
0f7e5ee6 | 17-Dec-2021 |
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> |
ALSA: HDA: hdac_ext_stream: use consistent prefixes for variables
The existing code maximizes confusion by using 'stream' and 'hstream' variables of different types. Examples:
struct hdac_stream *s
ALSA: HDA: hdac_ext_stream: use consistent prefixes for variables
The existing code maximizes confusion by using 'stream' and 'hstream' variables of different types. Examples:
struct hdac_stream *stream; struct hdac_ext_stream *stream; struct hdac_stream *hstream; struct hdac_ext_stream *hstream;
with some additional copy/paste remains: struct hdac_ext_stream *azx_dev;
This patch suggests a consistent naming across all 'hdac_ext_stream' functions. The convention is:
struct hdac_stream *hstream; struct hdac_ext_stream *hext_stream;
No functionality change - just renaming of variables and more consistent indentation.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20211216231128.344321-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|