Skip to content

Commit 53b5fdb

Browse files
committed
Merge tag 'asoc-fix-v6.7-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.7 A collection of fixes that have come in during the merge window, the majority of this is driver specific with one core fix for handling of DAPM clock widgets when a name prefix is specified for the card - the name should not be applied to the clock name we request from the clock API.
2 parents f0d9da1 + 45f2f28 commit 53b5fdb

File tree

12 files changed

+50
-32
lines changed

12 files changed

+50
-32
lines changed

sound/soc/amd/acp/acp-i2s.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
#define DRV_NAME "acp_i2s_playcap"
2828
#define I2S_MASTER_MODE_ENABLE 1
29-
#define I2S_MODE_ENABLE 0
3029
#define LRCLK_DIV_FIELD GENMASK(10, 2)
3130
#define BCLK_DIV_FIELD GENMASK(23, 11)
3231
#define ACP63_LRCLK_DIV_FIELD GENMASK(12, 2)
@@ -56,7 +55,8 @@ static inline void acp_set_i2s_clk(struct acp_dev_data *adata, int dai_id)
5655
}
5756

5857
val = I2S_MASTER_MODE_ENABLE;
59-
val |= I2S_MODE_ENABLE & BIT(1);
58+
if (adata->tdm_mode)
59+
val |= BIT(1);
6060

6161
switch (chip->acp_rev) {
6262
case ACP63_DEV:

sound/soc/codecs/aw88395/aw88395.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ static const struct snd_kcontrol_new aw88395_controls[] = {
356356
aw88395_get_fade_in_time, aw88395_set_fade_in_time),
357357
SOC_SINGLE_EXT("Volume Ramp Down Step", 0, 0, FADE_TIME_MAX, FADE_TIME_MIN,
358358
aw88395_get_fade_out_time, aw88395_set_fade_out_time),
359-
SOC_SINGLE_EXT("Calib", 0, 0, 100, 0,
359+
SOC_SINGLE_EXT("Calib", 0, 0, AW88395_CALI_RE_MAX, 0,
360360
aw88395_re_get, aw88395_re_set),
361361
AW88395_PROFILE_EXT("Profile Set", aw88395_profile_info,
362362
aw88395_profile_get, aw88395_profile_set),

sound/soc/codecs/aw88399.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ static int aw_dev_set_vcalb(struct aw88399 *aw88399)
438438
if (ret)
439439
return ret;
440440

441-
vsense_select = vsense_select & (~AW88399_VDSEL_MASK);
441+
vsense_select = vsense_value & (~AW88399_VDSEL_MASK);
442442

443443
ret = aw88399_dev_get_icalk(aw88399, &icalk);
444444
if (ret) {
@@ -486,8 +486,8 @@ static int aw_dev_update_cali_re(struct aw_cali_desc *cali_desc)
486486
u32 cali_re;
487487
int ret;
488488

489-
if ((aw_dev->cali_desc.cali_re <= AW88399_CALI_RE_MAX) ||
490-
(aw_dev->cali_desc.cali_re >= AW88399_CALI_RE_MIN))
489+
if ((aw_dev->cali_desc.cali_re >= AW88399_CALI_RE_MAX) ||
490+
(aw_dev->cali_desc.cali_re <= AW88399_CALI_RE_MIN))
491491
return -EINVAL;
492492

493493
cali_re = AW88399_SHOW_RE_TO_DSP_RE((aw_dev->cali_desc.cali_re +
@@ -1710,7 +1710,7 @@ static const struct snd_kcontrol_new aw88399_controls[] = {
17101710
aw88399_get_fade_in_time, aw88399_set_fade_in_time),
17111711
SOC_SINGLE_EXT("Volume Ramp Down Step", 0, 0, FADE_TIME_MAX, FADE_TIME_MIN,
17121712
aw88399_get_fade_out_time, aw88399_set_fade_out_time),
1713-
SOC_SINGLE_EXT("Calib", 0, 0, 100, 0,
1713+
SOC_SINGLE_EXT("Calib", 0, 0, AW88399_CALI_RE_MAX, 0,
17141714
aw88399_re_get, aw88399_re_set),
17151715
AW88399_PROFILE_EXT("AW88399 Profile Set", aw88399_profile_info,
17161716
aw88399_profile_get, aw88399_profile_set),

sound/soc/codecs/aw88399.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ enum {
522522

523523
enum {
524524
AW88399_DEV_VDSEL_DAC = 0,
525-
AW88399_DEV_VDSEL_VSENSE = 1,
525+
AW88399_DEV_VDSEL_VSENSE = 32,
526526
};
527527

528528
enum {

sound/soc/codecs/da7219-aad.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,10 +927,15 @@ void da7219_aad_suspend(struct snd_soc_component *component)
927927
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
928928
u8 micbias_ctrl;
929929

930+
disable_irq(da7219_aad->irq);
931+
930932
if (da7219_aad->jack) {
931933
/* Disable jack detection during suspend */
932934
snd_soc_component_update_bits(component, DA7219_ACCDET_CONFIG_1,
933935
DA7219_ACCDET_EN_MASK, 0);
936+
cancel_delayed_work_sync(&da7219_aad->jack_det_work);
937+
/* Disable ground switch */
938+
snd_soc_component_update_bits(component, 0xFB, 0x01, 0x00);
934939

935940
/*
936941
* If we have a 4-pole jack inserted, then micbias will be
@@ -947,8 +952,6 @@ void da7219_aad_suspend(struct snd_soc_component *component)
947952
}
948953
}
949954
}
950-
951-
synchronize_irq(da7219_aad->irq);
952955
}
953956

954957
void da7219_aad_resume(struct snd_soc_component *component)
@@ -971,6 +974,8 @@ void da7219_aad_resume(struct snd_soc_component *component)
971974
DA7219_ACCDET_EN_MASK,
972975
DA7219_ACCDET_EN_MASK);
973976
}
977+
978+
enable_irq(da7219_aad->irq);
974979
}
975980

976981

sound/soc/codecs/hdmi-codec.c

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -877,18 +877,13 @@ static int hdmi_codec_set_jack(struct snd_soc_component *component,
877877
void *data)
878878
{
879879
struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
880-
int ret = -ENOTSUPP;
881880

882881
if (hcp->hcd.ops->hook_plugged_cb) {
883882
hcp->jack = jack;
884-
ret = hcp->hcd.ops->hook_plugged_cb(component->dev->parent,
885-
hcp->hcd.data,
886-
plugged_cb,
887-
component->dev);
888-
if (ret)
889-
hcp->jack = NULL;
883+
return 0;
890884
}
891-
return ret;
885+
886+
return -ENOTSUPP;
892887
}
893888

894889
static int hdmi_dai_spdif_probe(struct snd_soc_dai *dai)
@@ -982,6 +977,21 @@ static int hdmi_of_xlate_dai_id(struct snd_soc_component *component,
982977
return ret;
983978
}
984979

980+
static int hdmi_probe(struct snd_soc_component *component)
981+
{
982+
struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
983+
int ret = 0;
984+
985+
if (hcp->hcd.ops->hook_plugged_cb) {
986+
ret = hcp->hcd.ops->hook_plugged_cb(component->dev->parent,
987+
hcp->hcd.data,
988+
plugged_cb,
989+
component->dev);
990+
}
991+
992+
return ret;
993+
}
994+
985995
static void hdmi_remove(struct snd_soc_component *component)
986996
{
987997
struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
@@ -992,6 +1002,7 @@ static void hdmi_remove(struct snd_soc_component *component)
9921002
}
9931003

9941004
static const struct snd_soc_component_driver hdmi_driver = {
1005+
.probe = hdmi_probe,
9951006
.remove = hdmi_remove,
9961007
.dapm_widgets = hdmi_widgets,
9971008
.num_dapm_widgets = ARRAY_SIZE(hdmi_widgets),

sound/soc/codecs/rt712-sdca.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -963,13 +963,6 @@ static int rt712_sdca_probe(struct snd_soc_component *component)
963963
rt712_sdca_parse_dt(rt712, &rt712->slave->dev);
964964
rt712->component = component;
965965

966-
if (!rt712->first_hw_init)
967-
return 0;
968-
969-
ret = pm_runtime_resume(component->dev);
970-
if (ret < 0 && ret != -EACCES)
971-
return ret;
972-
973966
/* add SPK route */
974967
if (rt712->hw_id != RT712_DEV_ID_713) {
975968
snd_soc_add_component_controls(component,
@@ -980,6 +973,13 @@ static int rt712_sdca_probe(struct snd_soc_component *component)
980973
rt712_sdca_spk_dapm_routes, ARRAY_SIZE(rt712_sdca_spk_dapm_routes));
981974
}
982975

976+
if (!rt712->first_hw_init)
977+
return 0;
978+
979+
ret = pm_runtime_resume(component->dev);
980+
if (ret < 0 && ret != -EACCES)
981+
return ret;
982+
983983
return 0;
984984
}
985985

sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ static int mt8186_mt6366_rt1019_rt5682s_dev_probe(struct platform_device *pdev)
12161216
playback_codec = of_get_child_by_name(pdev->dev.of_node, "playback-codecs");
12171217
if (!playback_codec) {
12181218
ret = -EINVAL;
1219-
dev_err_probe(&pdev->dev, ret, "Property 'speaker-codecs' missing or invalid\n");
1219+
dev_err_probe(&pdev->dev, ret, "Property 'playback-codecs' missing or invalid\n");
12201220
goto err_playback_codec;
12211221
}
12221222

@@ -1230,7 +1230,7 @@ static int mt8186_mt6366_rt1019_rt5682s_dev_probe(struct platform_device *pdev)
12301230
for_each_card_prelinks(card, i, dai_link) {
12311231
ret = mt8186_mt6366_card_set_be_link(card, dai_link, playback_codec, "I2S3");
12321232
if (ret) {
1233-
dev_err_probe(&pdev->dev, ret, "%s set speaker_codec fail\n",
1233+
dev_err_probe(&pdev->dev, ret, "%s set playback_codec fail\n",
12341234
dai_link->name);
12351235
goto err_probe;
12361236
}

sound/soc/rockchip/rockchip_i2s_tdm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,7 @@ static struct platform_driver rockchip_i2s_tdm_driver = {
17571757
.remove_new = rockchip_i2s_tdm_remove,
17581758
.driver = {
17591759
.name = DRV_NAME,
1760-
.of_match_table = of_match_ptr(rockchip_i2s_tdm_match),
1760+
.of_match_table = rockchip_i2s_tdm_match,
17611761
.pm = &rockchip_i2s_tdm_pm_ops,
17621762
},
17631763
};

sound/soc/soc-dapm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3670,7 +3670,7 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
36703670
dapm_pinctrl_event(w, NULL, SND_SOC_DAPM_POST_PMD);
36713671
break;
36723672
case snd_soc_dapm_clock_supply:
3673-
w->clk = devm_clk_get(dapm->dev, w->name);
3673+
w->clk = devm_clk_get(dapm->dev, widget->name);
36743674
if (IS_ERR(w->clk)) {
36753675
ret = PTR_ERR(w->clk);
36763676
goto request_failed;

0 commit comments

Comments
 (0)