Commit 53b5fdb6 authored by Takashi Iwai's avatar Takashi Iwai

Merge tag 'asoc-fix-v6.7-merge-window' of...

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.
parents f0d9da19 45f2f28b
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#define DRV_NAME "acp_i2s_playcap" #define DRV_NAME "acp_i2s_playcap"
#define I2S_MASTER_MODE_ENABLE 1 #define I2S_MASTER_MODE_ENABLE 1
#define I2S_MODE_ENABLE 0
#define LRCLK_DIV_FIELD GENMASK(10, 2) #define LRCLK_DIV_FIELD GENMASK(10, 2)
#define BCLK_DIV_FIELD GENMASK(23, 11) #define BCLK_DIV_FIELD GENMASK(23, 11)
#define ACP63_LRCLK_DIV_FIELD GENMASK(12, 2) #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) ...@@ -56,7 +55,8 @@ static inline void acp_set_i2s_clk(struct acp_dev_data *adata, int dai_id)
} }
val = I2S_MASTER_MODE_ENABLE; val = I2S_MASTER_MODE_ENABLE;
val |= I2S_MODE_ENABLE & BIT(1); if (adata->tdm_mode)
val |= BIT(1);
switch (chip->acp_rev) { switch (chip->acp_rev) {
case ACP63_DEV: case ACP63_DEV:
......
...@@ -356,7 +356,7 @@ static const struct snd_kcontrol_new aw88395_controls[] = { ...@@ -356,7 +356,7 @@ static const struct snd_kcontrol_new aw88395_controls[] = {
aw88395_get_fade_in_time, aw88395_set_fade_in_time), aw88395_get_fade_in_time, aw88395_set_fade_in_time),
SOC_SINGLE_EXT("Volume Ramp Down Step", 0, 0, FADE_TIME_MAX, FADE_TIME_MIN, SOC_SINGLE_EXT("Volume Ramp Down Step", 0, 0, FADE_TIME_MAX, FADE_TIME_MIN,
aw88395_get_fade_out_time, aw88395_set_fade_out_time), aw88395_get_fade_out_time, aw88395_set_fade_out_time),
SOC_SINGLE_EXT("Calib", 0, 0, 100, 0, SOC_SINGLE_EXT("Calib", 0, 0, AW88395_CALI_RE_MAX, 0,
aw88395_re_get, aw88395_re_set), aw88395_re_get, aw88395_re_set),
AW88395_PROFILE_EXT("Profile Set", aw88395_profile_info, AW88395_PROFILE_EXT("Profile Set", aw88395_profile_info,
aw88395_profile_get, aw88395_profile_set), aw88395_profile_get, aw88395_profile_set),
......
...@@ -438,7 +438,7 @@ static int aw_dev_set_vcalb(struct aw88399 *aw88399) ...@@ -438,7 +438,7 @@ static int aw_dev_set_vcalb(struct aw88399 *aw88399)
if (ret) if (ret)
return ret; return ret;
vsense_select = vsense_select & (~AW88399_VDSEL_MASK); vsense_select = vsense_value & (~AW88399_VDSEL_MASK);
ret = aw88399_dev_get_icalk(aw88399, &icalk); ret = aw88399_dev_get_icalk(aw88399, &icalk);
if (ret) { if (ret) {
...@@ -486,8 +486,8 @@ static int aw_dev_update_cali_re(struct aw_cali_desc *cali_desc) ...@@ -486,8 +486,8 @@ static int aw_dev_update_cali_re(struct aw_cali_desc *cali_desc)
u32 cali_re; u32 cali_re;
int ret; int ret;
if ((aw_dev->cali_desc.cali_re <= AW88399_CALI_RE_MAX) || if ((aw_dev->cali_desc.cali_re >= AW88399_CALI_RE_MAX) ||
(aw_dev->cali_desc.cali_re >= AW88399_CALI_RE_MIN)) (aw_dev->cali_desc.cali_re <= AW88399_CALI_RE_MIN))
return -EINVAL; return -EINVAL;
cali_re = AW88399_SHOW_RE_TO_DSP_RE((aw_dev->cali_desc.cali_re + 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[] = { ...@@ -1710,7 +1710,7 @@ static const struct snd_kcontrol_new aw88399_controls[] = {
aw88399_get_fade_in_time, aw88399_set_fade_in_time), aw88399_get_fade_in_time, aw88399_set_fade_in_time),
SOC_SINGLE_EXT("Volume Ramp Down Step", 0, 0, FADE_TIME_MAX, FADE_TIME_MIN, SOC_SINGLE_EXT("Volume Ramp Down Step", 0, 0, FADE_TIME_MAX, FADE_TIME_MIN,
aw88399_get_fade_out_time, aw88399_set_fade_out_time), aw88399_get_fade_out_time, aw88399_set_fade_out_time),
SOC_SINGLE_EXT("Calib", 0, 0, 100, 0, SOC_SINGLE_EXT("Calib", 0, 0, AW88399_CALI_RE_MAX, 0,
aw88399_re_get, aw88399_re_set), aw88399_re_get, aw88399_re_set),
AW88399_PROFILE_EXT("AW88399 Profile Set", aw88399_profile_info, AW88399_PROFILE_EXT("AW88399 Profile Set", aw88399_profile_info,
aw88399_profile_get, aw88399_profile_set), aw88399_profile_get, aw88399_profile_set),
......
...@@ -522,7 +522,7 @@ enum { ...@@ -522,7 +522,7 @@ enum {
enum { enum {
AW88399_DEV_VDSEL_DAC = 0, AW88399_DEV_VDSEL_DAC = 0,
AW88399_DEV_VDSEL_VSENSE = 1, AW88399_DEV_VDSEL_VSENSE = 32,
}; };
enum { enum {
......
...@@ -927,10 +927,15 @@ void da7219_aad_suspend(struct snd_soc_component *component) ...@@ -927,10 +927,15 @@ void da7219_aad_suspend(struct snd_soc_component *component)
struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component);
u8 micbias_ctrl; u8 micbias_ctrl;
disable_irq(da7219_aad->irq);
if (da7219_aad->jack) { if (da7219_aad->jack) {
/* Disable jack detection during suspend */ /* Disable jack detection during suspend */
snd_soc_component_update_bits(component, DA7219_ACCDET_CONFIG_1, snd_soc_component_update_bits(component, DA7219_ACCDET_CONFIG_1,
DA7219_ACCDET_EN_MASK, 0); DA7219_ACCDET_EN_MASK, 0);
cancel_delayed_work_sync(&da7219_aad->jack_det_work);
/* Disable ground switch */
snd_soc_component_update_bits(component, 0xFB, 0x01, 0x00);
/* /*
* If we have a 4-pole jack inserted, then micbias will be * 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) ...@@ -947,8 +952,6 @@ void da7219_aad_suspend(struct snd_soc_component *component)
} }
} }
} }
synchronize_irq(da7219_aad->irq);
} }
void da7219_aad_resume(struct snd_soc_component *component) void da7219_aad_resume(struct snd_soc_component *component)
...@@ -971,6 +974,8 @@ void da7219_aad_resume(struct snd_soc_component *component) ...@@ -971,6 +974,8 @@ void da7219_aad_resume(struct snd_soc_component *component)
DA7219_ACCDET_EN_MASK, DA7219_ACCDET_EN_MASK,
DA7219_ACCDET_EN_MASK); DA7219_ACCDET_EN_MASK);
} }
enable_irq(da7219_aad->irq);
} }
......
...@@ -877,18 +877,13 @@ static int hdmi_codec_set_jack(struct snd_soc_component *component, ...@@ -877,18 +877,13 @@ static int hdmi_codec_set_jack(struct snd_soc_component *component,
void *data) void *data)
{ {
struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component); struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
int ret = -ENOTSUPP;
if (hcp->hcd.ops->hook_plugged_cb) { if (hcp->hcd.ops->hook_plugged_cb) {
hcp->jack = jack; hcp->jack = jack;
ret = hcp->hcd.ops->hook_plugged_cb(component->dev->parent, return 0;
hcp->hcd.data,
plugged_cb,
component->dev);
if (ret)
hcp->jack = NULL;
} }
return ret;
return -ENOTSUPP;
} }
static int hdmi_dai_spdif_probe(struct snd_soc_dai *dai) 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, ...@@ -982,6 +977,21 @@ static int hdmi_of_xlate_dai_id(struct snd_soc_component *component,
return ret; return ret;
} }
static int hdmi_probe(struct snd_soc_component *component)
{
struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
int ret = 0;
if (hcp->hcd.ops->hook_plugged_cb) {
ret = hcp->hcd.ops->hook_plugged_cb(component->dev->parent,
hcp->hcd.data,
plugged_cb,
component->dev);
}
return ret;
}
static void hdmi_remove(struct snd_soc_component *component) static void hdmi_remove(struct snd_soc_component *component)
{ {
struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component); struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);
...@@ -992,6 +1002,7 @@ static void hdmi_remove(struct snd_soc_component *component) ...@@ -992,6 +1002,7 @@ static void hdmi_remove(struct snd_soc_component *component)
} }
static const struct snd_soc_component_driver hdmi_driver = { static const struct snd_soc_component_driver hdmi_driver = {
.probe = hdmi_probe,
.remove = hdmi_remove, .remove = hdmi_remove,
.dapm_widgets = hdmi_widgets, .dapm_widgets = hdmi_widgets,
.num_dapm_widgets = ARRAY_SIZE(hdmi_widgets), .num_dapm_widgets = ARRAY_SIZE(hdmi_widgets),
......
...@@ -963,13 +963,6 @@ static int rt712_sdca_probe(struct snd_soc_component *component) ...@@ -963,13 +963,6 @@ static int rt712_sdca_probe(struct snd_soc_component *component)
rt712_sdca_parse_dt(rt712, &rt712->slave->dev); rt712_sdca_parse_dt(rt712, &rt712->slave->dev);
rt712->component = component; rt712->component = component;
if (!rt712->first_hw_init)
return 0;
ret = pm_runtime_resume(component->dev);
if (ret < 0 && ret != -EACCES)
return ret;
/* add SPK route */ /* add SPK route */
if (rt712->hw_id != RT712_DEV_ID_713) { if (rt712->hw_id != RT712_DEV_ID_713) {
snd_soc_add_component_controls(component, snd_soc_add_component_controls(component,
...@@ -980,6 +973,13 @@ static int rt712_sdca_probe(struct snd_soc_component *component) ...@@ -980,6 +973,13 @@ static int rt712_sdca_probe(struct snd_soc_component *component)
rt712_sdca_spk_dapm_routes, ARRAY_SIZE(rt712_sdca_spk_dapm_routes)); rt712_sdca_spk_dapm_routes, ARRAY_SIZE(rt712_sdca_spk_dapm_routes));
} }
if (!rt712->first_hw_init)
return 0;
ret = pm_runtime_resume(component->dev);
if (ret < 0 && ret != -EACCES)
return ret;
return 0; return 0;
} }
......
...@@ -1216,7 +1216,7 @@ static int mt8186_mt6366_rt1019_rt5682s_dev_probe(struct platform_device *pdev) ...@@ -1216,7 +1216,7 @@ static int mt8186_mt6366_rt1019_rt5682s_dev_probe(struct platform_device *pdev)
playback_codec = of_get_child_by_name(pdev->dev.of_node, "playback-codecs"); playback_codec = of_get_child_by_name(pdev->dev.of_node, "playback-codecs");
if (!playback_codec) { if (!playback_codec) {
ret = -EINVAL; ret = -EINVAL;
dev_err_probe(&pdev->dev, ret, "Property 'speaker-codecs' missing or invalid\n"); dev_err_probe(&pdev->dev, ret, "Property 'playback-codecs' missing or invalid\n");
goto err_playback_codec; goto err_playback_codec;
} }
...@@ -1230,7 +1230,7 @@ static int mt8186_mt6366_rt1019_rt5682s_dev_probe(struct platform_device *pdev) ...@@ -1230,7 +1230,7 @@ static int mt8186_mt6366_rt1019_rt5682s_dev_probe(struct platform_device *pdev)
for_each_card_prelinks(card, i, dai_link) { for_each_card_prelinks(card, i, dai_link) {
ret = mt8186_mt6366_card_set_be_link(card, dai_link, playback_codec, "I2S3"); ret = mt8186_mt6366_card_set_be_link(card, dai_link, playback_codec, "I2S3");
if (ret) { if (ret) {
dev_err_probe(&pdev->dev, ret, "%s set speaker_codec fail\n", dev_err_probe(&pdev->dev, ret, "%s set playback_codec fail\n",
dai_link->name); dai_link->name);
goto err_probe; goto err_probe;
} }
......
...@@ -1757,7 +1757,7 @@ static struct platform_driver rockchip_i2s_tdm_driver = { ...@@ -1757,7 +1757,7 @@ static struct platform_driver rockchip_i2s_tdm_driver = {
.remove_new = rockchip_i2s_tdm_remove, .remove_new = rockchip_i2s_tdm_remove,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.of_match_table = of_match_ptr(rockchip_i2s_tdm_match), .of_match_table = rockchip_i2s_tdm_match,
.pm = &rockchip_i2s_tdm_pm_ops, .pm = &rockchip_i2s_tdm_pm_ops,
}, },
}; };
......
...@@ -3670,7 +3670,7 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm, ...@@ -3670,7 +3670,7 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm,
dapm_pinctrl_event(w, NULL, SND_SOC_DAPM_POST_PMD); dapm_pinctrl_event(w, NULL, SND_SOC_DAPM_POST_PMD);
break; break;
case snd_soc_dapm_clock_supply: case snd_soc_dapm_clock_supply:
w->clk = devm_clk_get(dapm->dev, w->name); w->clk = devm_clk_get(dapm->dev, widget->name);
if (IS_ERR(w->clk)) { if (IS_ERR(w->clk)) {
ret = PTR_ERR(w->clk); ret = PTR_ERR(w->clk);
goto request_failed; goto request_failed;
......
...@@ -176,7 +176,7 @@ int sof_register_clients(struct snd_sof_dev *sdev) ...@@ -176,7 +176,7 @@ int sof_register_clients(struct snd_sof_dev *sdev)
goto err_kernel_injector; goto err_kernel_injector;
} }
/* Platform depndent client device registration */ /* Platform dependent client device registration */
if (sof_ops(sdev) && sof_ops(sdev)->register_ipc_clients) if (sof_ops(sdev) && sof_ops(sdev)->register_ipc_clients)
ret = sof_ops(sdev)->register_ipc_clients(sdev); ret = sof_ops(sdev)->register_ipc_clients(sdev);
......
...@@ -73,14 +73,16 @@ static int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id) ...@@ -73,14 +73,16 @@ static int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id)
return 0; return 0;
} }
pm_runtime_put_sync(mcbsp->dev); if (mcbsp->active)
pm_runtime_put_sync(mcbsp->dev);
r = clk_set_parent(mcbsp->fclk, fck_src); r = clk_set_parent(mcbsp->fclk, fck_src);
if (r) if (r)
dev_err(mcbsp->dev, "CLKS: could not clk_set_parent() to %s\n", dev_err(mcbsp->dev, "CLKS: could not clk_set_parent() to %s\n",
src); src);
pm_runtime_get_sync(mcbsp->dev); if (mcbsp->active)
pm_runtime_get_sync(mcbsp->dev);
clk_put(fck_src); clk_put(fck_src);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment