History log of /linux-master/sound/soc/codecs/hda.c
Revision Date Author Comments
# 3adb233e 26-Feb-2024 Cezary Rojewski <cezary.rojewski@intel.com>

ASoC: codecs: hda: Cleanup error messages

Be cohesive and use same pattern in each error message.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240226124432.1203798-5-cezary.rojewski@intel.com


# cf9c19df 26-Feb-2024 Cezary Rojewski <cezary.rojewski@intel.com>

ASoC: codecs: hda: Skip HDMI/DP registration if i915 is missing

If i915 does not support given platform but the hardware i.e.: HDAudio
codec is still there, the codec-probing procedure will succeed for such
device but the follow up initialization will always end up with -ENODEV.

While bus could filter out address '2' which Intel's HDMI/DP codecs
always enumerate on, more robust approach is to check for i915 presence
before registering display codecs.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240226124432.1203798-3-cezary.rojewski@intel.com


# d5c00ab2 17-Nov-2023 Cezary Rojewski <cezary.rojewski@intel.com>

ASoC: codecs: hda: Switch to new stream-format interface

To provide option for selecting different bit-per-sample than just the
maximum one, use the new format calculation mechanism.

While at it, complete PCM stream initialization with subformat options.

Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20231117120610.1755254-9-cezary.rojewski@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5bf13408 30-Jan-2023 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: hda: use helper function

Current ASoC has many helper function.
This patch use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87357rfoq1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# b0cd60f3 19-Oct-2022 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ALSA/ASoC: hda: clarify bus_get_link() and bus_link_get() helpers

We have two helpers with confusing names and different purposes.

Rename bus_get_link() and bus_get_link_at() as bus_get_hlink_by_name()
and bus_get_hlink_by_addr() respectively.

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>
Link: https://lore.kernel.org/r/20221019162115.185917-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c196b412 18-Oct-2022 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: soc-dapm.c: ignore parameter NULL at snd_soc_dapm_free_widget()

Currently snd_soc_dapm_free_widget() is assuming input parameter is
non NULL. Thus, caller need to care about it.
This patch care it at snd_soc_dapm_free_widget().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/875yggtzsq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 1c9096f3 17-Oct-2022 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

ASoC: soc-dapm.c: ignore parameter NULL at snd_soc_dapm_free_widget()

Currently snd_soc_dapm_free_widget() is assuming input parameter is
non NULL. Thus, caller need to care about it.
This patch care it at snd_soc_dapm_free_widget().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87wn8yowdr.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 62d0cee4 10-Oct-2022 Cezary Rojewski <cezary.rojewski@intel.com>

ASoC: codecs: hda: Fix spelling error in log message

To improve readability.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221010121955.718168-16-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# ef6f5494 22-Sep-2022 Jaroslav Kysela <perex@perex.cz>

ALSA: hda/hdmi: Use only dynamic PCM device allocation

Per discussion on the alsa-devel mailing list [1], the legacy PIN to PCM
device mapping is obsolete nowadays. The maximum number of the simultaneously
usable PCM devices is equal to the HDMI codec converters.

Remove the extra PCM devices (beyond the detected converters) and force
the use of the dynamic PCM device allocation. The legacy code is removed.

I believe that all HDMI codecs have the jack sensing feature. Move the check
to the codec probe function and print a warning, if a codec without this
feature is detected.

[1] https://lore.kernel.org/alsa-devel/2f37e0b2-1e82-8c0b-2bbd-1e5038d6ecc6@perex.cz/

Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220922084017.25925-1-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e7255c00 06-Jul-2022 Cezary Rojewski <cezary.rojewski@intel.com>

ALSA: hda: Skip event processing for unregistered codecs

When codec is unbound but not yet removed, in the eyes of
snd_hdac_bus_process_unsol_events() it is still a valid target to
delegate work to. Such behaviour may lead to use-after-free errors.
Address by verifying if codec is actually registered.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220706120230.427296-6-cezary.rojewski@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b5df2a7d 11-May-2022 Cezary Rojewski <cezary.rojewski@intel.com>

ASoC: codecs: Add HD-Audio codec driver

Add generic ASoC equivalent of ALSA HD-Audio codec. This codec is
designed to follow HDA_DEV_LEGACY convention. Driver wrapps existing
hda_codec.c handlers to prevent code duplication within the newly added
code. Number of DAIs created is dependent on capabilities exposed by the
codec itself. Because of this, single solution can be applied to support
every single HD-Audio codec type.

At the same time, through the ASoC topology, platform drivers may limit
the number of endpoints available to the userspace as codec driver
exposes BE DAIs only.

Both hda_codec_probe() and hda_codec_remove() declare their expectations
on device's usage_count and suspended-status. This is to catch any
unexpected behavior as PM-related code for HD-Audio has been changing
quite a bit throughout the years.

In order for codec DAI list to reflect its actual PCM capabilities, PCMs
need to be built and that can only happen once codec device is
constructed. To do that, a valid component->card->snd_card pointer is
needed. Said pointer will be provided by the framework once all card
components are accounted for and their probing can begin. Usage of
"binder" BE DAI solves the problem - codec can be listed as one of
HD-Audio card components without declaring any actual BE DAIs
statically.

Relation with hdac_hda:

Addition of parallel solution is motivated by behavioral differences
between hdac_hda.c and its legacy equivalent found in sound/pci/hda
e.g.: lack of dynamic, based on codec capabilities, resource allocation
and high cost of removing such differences on actively used targets.
Major goal of codec driver presented here is to follow HD-Audio legacy
behavior in 1:1 fashion by becoming a wrapper. Doing so increases code
coverage of the legacy code and reduces the maintenance cost for both
solutions.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220511162403.3987658-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>