| 62582341 | 19-Oct-2022 |
Pierre-Louis Bossart <[email protected]> |
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 <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Bard Liao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|
| f9002510 | 19-Oct-2022 |
Pierre-Louis Bossart <[email protected]> |
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 <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|
| 26646c19 | 19-Oct-2022 |
Pierre-Louis Bossart <[email protected]> |
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 <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|
| 7fa403f2 | 19-Oct-2022 |
Pierre-Louis Bossart <[email protected]> |
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 <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|
| c6fe6be6 | 19-Sep-2022 |
Pierre-Louis Bossart <[email protected]> |
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 <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|
| ac3467ad | 19-Sep-2022 |
Pierre-Louis Bossart <[email protected]> |
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 <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|
| 53f4f6b4 | 19-Sep-2022 |
Pierre-Louis Bossart <[email protected]> |
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 <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|
| 0839a04e | 19-Sep-2022 |
Pierre-Louis Bossart <[email protected]> |
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 <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|
| 0f7e5ee6 | 16-Dec-2021 |
Pierre-Louis Bossart <[email protected]> |
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 <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Rander Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
show more ...
|