Skip to content

Commit

Permalink
Merge tag 'asoc-fix-v6.11-rc6' of https://git.kernel.org/pub/scm/linu…
Browse files Browse the repository at this point in the history
…x/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.11

A larger set of fixes than I'd like at this point, but mainly due to
people working on fixing module autoloading by adding missing exports of
ID tables rather than anything particularly concerning.  There are some
other runtime fixes and quirks, and a tweak to the ABI definition for
SOF which ensures that a struct layout doesn't vary depending on the
architecture of the host.
  • Loading branch information
Takashi Iwai committed Sep 6, 2024
2 parents a83e4c9 + 77212f3 commit c491b04
Show file tree
Hide file tree
Showing 23 changed files with 127 additions and 91 deletions.
2 changes: 1 addition & 1 deletion include/sound/sof/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ enum sof_comp_type {
struct sof_ipc_comp {
struct sof_ipc_cmd_hdr hdr;
uint32_t id;
enum sof_comp_type type;
uint32_t type;
uint32_t pipeline_id;
uint32_t core;

Expand Down
2 changes: 1 addition & 1 deletion include/uapi/sound/sof/abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
/* SOF ABI version major, minor and patch numbers */
#define SOF_ABI_MAJOR 3
#define SOF_ABI_MINOR 23
#define SOF_ABI_PATCH 0
#define SOF_ABI_PATCH 1

/* SOF ABI version number. Format within 32bit word is MMmmmppp */
#define SOF_ABI_MAJOR_SHIFT 24
Expand Down
7 changes: 7 additions & 0 deletions sound/soc/amd/yc/acp6x-mach.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 15 C7VF"),
}
},
{
.driver_data = &acp6x_card,
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."),
DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 17 D7VEK"),
}
},
{
.driver_data = &acp6x_card,
.matches = {
Expand Down
1 change: 1 addition & 0 deletions sound/soc/codecs/chv3-codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ static const struct of_device_id chv3_codec_of_match[] = {
{ .compatible = "google,chv3-codec", },
{ }
};
MODULE_DEVICE_TABLE(of, chv3_codec_of_match);

static struct platform_driver chv3_codec_platform_driver = {
.driver = {
Expand Down
11 changes: 10 additions & 1 deletion sound/soc/codecs/lpass-va-macro.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,13 @@ struct va_macro {
struct va_macro_data {
bool has_swr_master;
bool has_npl_clk;
int version;
};

static const struct va_macro_data sm8250_va_data = {
.has_swr_master = false,
.has_npl_clk = false,
.version = LPASS_CODEC_VERSION_1_0,
};

static const struct va_macro_data sm8450_va_data = {
Expand Down Expand Up @@ -1587,7 +1589,14 @@ static int va_macro_probe(struct platform_device *pdev)
goto err_npl;
}

va_macro_set_lpass_codec_version(va);
/**
* old version of codecs do not have a reliable way to determine the
* version from registers, get them from soc specific data
*/
if (data->version)
lpass_macro_set_codec_version(data->version);
else /* read version from register */
va_macro_set_lpass_codec_version(va);

if (va->has_swr_master) {
/* Set default CLK div to 1 */
Expand Down
1 change: 1 addition & 0 deletions sound/soc/codecs/tda7419.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ static const struct of_device_id tda7419_of_match[] = {
{ .compatible = "st,tda7419" },
{ },
};
MODULE_DEVICE_TABLE(of, tda7419_of_match);

static struct i2c_driver tda7419_driver = {
.driver = {
Expand Down
1 change: 1 addition & 0 deletions sound/soc/google/chv3-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ static const struct of_device_id chv3_i2s_of_match[] = {
{ .compatible = "google,chv3-i2s" },
{},
};
MODULE_DEVICE_TABLE(of, chv3_i2s_of_match);

static struct platform_driver chv3_i2s_driver = {
.probe = chv3_i2s_probe,
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/bxt_rt298.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ static int broxton_audio_probe(struct platform_device *pdev)
int i;

for (i = 0; i < ARRAY_SIZE(broxton_rt298_dais); i++) {
if (card->dai_link[i].codecs->name &&
if (card->dai_link[i].num_codecs &&
!strncmp(card->dai_link[i].codecs->name, "i2c-INT343A:00",
I2C_NAME_SIZE)) {
if (!strncmp(card->name, "broxton-rt298",
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/bytcht_cx2072x.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static int snd_byt_cht_cx2072x_probe(struct platform_device *pdev)

/* fix index of codec dai */
for (i = 0; i < ARRAY_SIZE(byt_cht_cx2072x_dais); i++) {
if (byt_cht_cx2072x_dais[i].codecs->name &&
if (byt_cht_cx2072x_dais[i].num_codecs &&
!strcmp(byt_cht_cx2072x_dais[i].codecs->name,
"i2c-14F10720:00")) {
dai_index = i;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/bytcht_da7213.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ static int bytcht_da7213_probe(struct platform_device *pdev)

/* fix index of codec dai */
for (i = 0; i < ARRAY_SIZE(dailink); i++) {
if (dailink[i].codecs->name &&
if (dailink[i].num_codecs &&
!strcmp(dailink[i].codecs->name, "i2c-DLGS7213:00")) {
dai_index = i;
break;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/bytcht_es8316.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)

/* fix index of codec dai */
for (i = 0; i < ARRAY_SIZE(byt_cht_es8316_dais); i++) {
if (byt_cht_es8316_dais[i].codecs->name &&
if (byt_cht_es8316_dais[i].num_codecs &&
!strcmp(byt_cht_es8316_dais[i].codecs->name,
"i2c-ESSX8316:00")) {
dai_index = i;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/bytcr_rt5640.c
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)

/* fix index of codec dai */
for (i = 0; i < ARRAY_SIZE(byt_rt5640_dais); i++) {
if (byt_rt5640_dais[i].codecs->name &&
if (byt_rt5640_dais[i].num_codecs &&
!strcmp(byt_rt5640_dais[i].codecs->name,
"i2c-10EC5640:00")) {
dai_index = i;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/bytcr_rt5651.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)

/* fix index of codec dai */
for (i = 0; i < ARRAY_SIZE(byt_rt5651_dais); i++) {
if (byt_rt5651_dais[i].codecs->name &&
if (byt_rt5651_dais[i].num_codecs &&
!strcmp(byt_rt5651_dais[i].codecs->name,
"i2c-10EC5651:00")) {
dai_index = i;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/bytcr_wm5102.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ static int snd_byt_wm5102_mc_probe(struct platform_device *pdev)

/* find index of codec dai */
for (i = 0; i < ARRAY_SIZE(byt_wm5102_dais); i++) {
if (byt_wm5102_dais[i].codecs->name &&
if (byt_wm5102_dais[i].num_codecs &&
!strcmp(byt_wm5102_dais[i].codecs->name,
"wm5102-codec")) {
dai_index = i;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/cht_bsw_rt5645.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)

/* set correct codec name */
for (i = 0; i < ARRAY_SIZE(cht_dailink); i++)
if (cht_dailink[i].codecs->name &&
if (cht_dailink[i].num_codecs &&
!strcmp(cht_dailink[i].codecs->name,
"i2c-10EC5645:00")) {
dai_index = i;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/cht_bsw_rt5672.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)

/* find index of codec dai */
for (i = 0; i < ARRAY_SIZE(cht_dailink); i++) {
if (cht_dailink[i].codecs->name &&
if (cht_dailink[i].num_codecs &&
!strcmp(cht_dailink[i].codecs->name, RT5672_I2C_DEFAULT)) {
dai_index = i;
break;
Expand Down
1 change: 0 additions & 1 deletion sound/soc/intel/common/soc-acpi-intel-cht-match.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ static const struct dmi_system_id lenovo_yoga_tab3_x90[] = {
/* Lenovo Yoga Tab 3 Pro YT3-X90, codec missing from DSDT */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"),
},
},
Expand Down
1 change: 1 addition & 0 deletions sound/soc/intel/keembay/kmb_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,7 @@ static const struct of_device_id kmb_plat_of_match[] = {
{ .compatible = "intel,keembay-tdm", .data = &intel_kmb_tdm_dai},
{}
};
MODULE_DEVICE_TABLE(of, kmb_plat_of_match);

static int kmb_plat_dai_probe(struct platform_device *pdev)
{
Expand Down
17 changes: 13 additions & 4 deletions sound/soc/mediatek/mt8188/mt8188-mt6359.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,7 @@ static int mt8188_headset_codec_init(struct snd_soc_pcm_runtime *rtd)
struct mtk_soc_card_data *soc_card_data = snd_soc_card_get_drvdata(rtd->card);
struct snd_soc_jack *jack = &soc_card_data->card_data->jacks[MT8188_JACK_HEADSET];
struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component;
struct mtk_platform_card_data *card_data = soc_card_data->card_data;
int ret;

ret = snd_soc_dapm_new_controls(&card->dapm, mt8188_nau8825_widgets,
Expand Down Expand Up @@ -762,10 +763,18 @@ static int mt8188_headset_codec_init(struct snd_soc_pcm_runtime *rtd)
return ret;
}

snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
if (card_data->flags & ES8326_HS_PRESENT) {
snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
} else {
snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
}

ret = snd_soc_component_set_jack(component, jack, NULL);

if (ret) {
Expand Down
1 change: 1 addition & 0 deletions sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -4057,6 +4057,7 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,

case SND_SOC_DAPM_POST_PMD:
kfree(substream->runtime);
substream->runtime = NULL;
break;

default:
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/sof/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -2050,6 +2050,8 @@ static int sof_link_unload(struct snd_soc_component *scomp, struct snd_soc_dobj
if (!slink)
return 0;

slink->link->platforms->name = NULL;

kfree(slink->tuples);
list_del(&slink->list);
kfree(slink->hw_configs);
Expand Down
Loading

0 comments on commit c491b04

Please sign in to comment.