diff options
| author | Takashi Iwai <tiwai@suse.de> | 2025-12-02 07:12:56 +0100 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-12-02 07:12:56 +0100 |
| commit | 9747b22a417d2a7c478678143863b9777de104e4 (patch) | |
| tree | 2690242ac1e95570c3e56a3106752af4cc2b5472 /sound/soc/intel/boards/sof_maxim_common.c | |
| parent | ef5e0a02d842b2c6dfcfd9b80feb185769b892ef (diff) | |
| parent | c5fae31f60a91dbe884ef2789fb3440bb4cddf05 (diff) | |
Merge tag 'asoc-v6.19' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v6.19
This is a very large set of updates, as well as some more extensive
cleanup work from Morimto-san we've also added a generic SCDA class
driver for SoundWire devices enabling us to support many chips with
no custom code. There's also a batch of new drivers added for both
SoCs and CODECs.
- Added a SoundWire SCDA generic class driver, pulling in a little
regmap work to support it.
- A *lot* of cleaup and API improvement work from Morimoto-san.
- Lots of work on the existing Cirrus, Intel, Maxim and Qualcomm
drivers.
- Support for Allwinner A523, Mediatek MT8189, Qualcomm QCM2290,
QRB2210 and SM6115, SpacemiT K1, and TI TAS2568, TAS5802, TAS5806,
TAS5815, TAS5828 and TAS5830.
This also pulls in some gpiolib changes supporting shared GPIOs in the
core there so we can convert some of the ASoC drivers open coding
handling of that to the core functionality.
Diffstat (limited to 'sound/soc/intel/boards/sof_maxim_common.c')
| -rw-r--r-- | sound/soc/intel/boards/sof_maxim_common.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sound/soc/intel/boards/sof_maxim_common.c b/sound/soc/intel/boards/sof_maxim_common.c index c98a67ae5e66..c3d0f697ff8d 100644 --- a/sound/soc/intel/boards/sof_maxim_common.c +++ b/sound/soc/intel/boards/sof_maxim_common.c @@ -201,8 +201,7 @@ static int max_98373_trigger(struct snd_pcm_substream *substream, int cmd) cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); for_each_rtd_codec_dais(rtd, j, codec_dai) { - struct snd_soc_dapm_context *dapm = - snd_soc_component_get_dapm(cpu_dai->component); + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(cpu_dai->component); char pin_name[MAX_98373_PIN_NAME]; snprintf(pin_name, ARRAY_SIZE(pin_name), "%s Spk", @@ -239,12 +238,13 @@ static const struct snd_soc_ops max_98373_ops = { static int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_card *card = rtd->card; + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card); unsigned int num_codecs = get_num_codecs(MAX_98373_ACPI_HID); int ret; switch (num_codecs) { case 2: - ret = snd_soc_dapm_new_controls(&card->dapm, maxim_2spk_widgets, + ret = snd_soc_dapm_new_controls(dapm, maxim_2spk_widgets, ARRAY_SIZE(maxim_2spk_widgets)); if (ret) { dev_err(rtd->dev, "fail to add max98373 widgets, ret %d\n", @@ -260,7 +260,7 @@ static int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd) return ret; } - ret = snd_soc_dapm_add_routes(&card->dapm, max_98373_dapm_routes, + ret = snd_soc_dapm_add_routes(dapm, max_98373_dapm_routes, ARRAY_SIZE(max_98373_dapm_routes)); if (ret) { dev_err(rtd->dev, "fail to add max98373 routes, ret %d\n", @@ -416,13 +416,14 @@ static int max_98390_hw_params(struct snd_pcm_substream *substream, static int max_98390_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_card *card = rtd->card; + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card); unsigned int num_codecs = get_num_codecs(MAX_98390_ACPI_HID); int ret; switch (num_codecs) { case 4: /* add widgets/controls/dapm for tweeter speakers */ - ret = snd_soc_dapm_new_controls(&card->dapm, max_98390_tt_dapm_widgets, + ret = snd_soc_dapm_new_controls(dapm, max_98390_tt_dapm_widgets, ARRAY_SIZE(max_98390_tt_dapm_widgets)); if (ret) { dev_err(rtd->dev, "unable to add tweeter dapm widgets, ret %d\n", @@ -439,7 +440,7 @@ static int max_98390_init(struct snd_soc_pcm_runtime *rtd) return ret; } - ret = snd_soc_dapm_add_routes(&card->dapm, max_98390_tt_dapm_routes, + ret = snd_soc_dapm_add_routes(dapm, max_98390_tt_dapm_routes, ARRAY_SIZE(max_98390_tt_dapm_routes)); if (ret) { dev_err(rtd->dev, "unable to add tweeter dapm routes, ret %d\n", @@ -450,7 +451,7 @@ static int max_98390_init(struct snd_soc_pcm_runtime *rtd) fallthrough; case 2: /* add regular speakers dapm route */ - ret = snd_soc_dapm_new_controls(&card->dapm, maxim_2spk_widgets, + ret = snd_soc_dapm_new_controls(dapm, maxim_2spk_widgets, ARRAY_SIZE(maxim_2spk_widgets)); if (ret) { dev_err(rtd->dev, "fail to add max98390 woofer widgets, ret %d\n", @@ -466,7 +467,7 @@ static int max_98390_init(struct snd_soc_pcm_runtime *rtd) return ret; } - ret = snd_soc_dapm_add_routes(&card->dapm, max_98390_dapm_routes, + ret = snd_soc_dapm_add_routes(dapm, max_98390_dapm_routes, ARRAY_SIZE(max_98390_dapm_routes)); if (ret) { dev_err(rtd->dev, "unable to add dapm routes, ret %d\n", @@ -564,9 +565,10 @@ static struct snd_soc_dai_link_component max_98360a_components[] = { static int max_98357a_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_card *card = rtd->card; + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card); int ret; - ret = snd_soc_dapm_new_controls(&card->dapm, max_98357a_dapm_widgets, + ret = snd_soc_dapm_new_controls(dapm, max_98357a_dapm_widgets, ARRAY_SIZE(max_98357a_dapm_widgets)); if (ret) { dev_err(rtd->dev, "unable to add dapm controls, ret %d\n", ret); @@ -581,7 +583,7 @@ static int max_98357a_init(struct snd_soc_pcm_runtime *rtd) return ret; } - ret = snd_soc_dapm_add_routes(&card->dapm, max_98357a_dapm_routes, + ret = snd_soc_dapm_add_routes(dapm, max_98357a_dapm_routes, ARRAY_SIZE(max_98357a_dapm_routes)); if (ret) |