Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…l/git/broonie/sound into for-linus

ASoC: Fixes for v5.6

A collection of updates for bugs fixed since the initial pull
request, the most important one being the addition of COMMON_CLK
for wcd934x which is needed for MFD to be merged.
  • Loading branch information
tiwai committed Feb 5, 2020
2 parents c7e661a + 42b7163 commit 9db0288
Show file tree
Hide file tree
Showing 25 changed files with 118 additions and 123 deletions.
1 change: 0 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -13947,7 +13947,6 @@ F: include/linux/platform_data/rtc-*
F: tools/testing/selftests/rtc/

REALTEK AUDIO CODECS
M: Bard Liao <[email protected]>
M: Oder Chiou <[email protected]>
S: Maintained
F: sound/soc/codecs/rt*
Expand Down
12 changes: 7 additions & 5 deletions sound/soc/amd/raven/acp3x-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,30 +234,32 @@ static int acp3x_i2s_trigger(struct snd_pcm_substream *substream,
switch (rtd->i2s_instance) {
case I2S_BT_INSTANCE:
reg_val = mmACP_BTTDM_ITER;
ier_val = mmACP_BTTDM_IER;
break;
case I2S_SP_INSTANCE:
default:
reg_val = mmACP_I2STDM_ITER;
ier_val = mmACP_I2STDM_IER;
}

} else {
switch (rtd->i2s_instance) {
case I2S_BT_INSTANCE:
reg_val = mmACP_BTTDM_IRER;
ier_val = mmACP_BTTDM_IER;
break;
case I2S_SP_INSTANCE:
default:
reg_val = mmACP_I2STDM_IRER;
ier_val = mmACP_I2STDM_IER;
}
}
val = rv_readl(rtd->acp3x_base + reg_val);
val = val & ~BIT(0);
rv_writel(val, rtd->acp3x_base + reg_val);
rv_writel(0, rtd->acp3x_base + ier_val);

if (!(rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER) & BIT(0)) &&
!(rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER) & BIT(0)))
rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER);
if (!(rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER) & BIT(0)) &&
!(rv_readl(rtd->acp3x_base + mmACP_I2STDM_IRER) & BIT(0)))
rv_writel(0, rtd->acp3x_base + mmACP_I2STDM_IER);
ret = 0;
break;
default:
Expand Down
14 changes: 7 additions & 7 deletions sound/soc/amd/raven/acp3x-pcm-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,20 +349,20 @@ static int acp3x_dma_close(struct snd_soc_component *component,
component = snd_soc_rtdcom_lookup(prtd, DRV_NAME);
adata = dev_get_drvdata(component->dev);

if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = NULL;
adata->i2ssp_play_stream = NULL;
} else {
adata->capture_stream = NULL;
adata->i2ssp_capture_stream = NULL;
}

/* Disable ACP irq, when the current stream is being closed and
* another stream is also not active.
*/
if (!adata->play_stream && !adata->capture_stream &&
!adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
adata->play_stream = NULL;
adata->i2ssp_play_stream = NULL;
} else {
adata->capture_stream = NULL;
adata->i2ssp_capture_stream = NULL;
}
return 0;
}

Expand Down
1 change: 1 addition & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1334,6 +1334,7 @@ config SND_SOC_WCD9335

config SND_SOC_WCD934X
tristate "WCD9340/WCD9341 Codec"
depends on COMMON_CLK
depends on MFD_WCD934X
help
The WCD9340/9341 is a audio codec IC Integrated in
Expand Down
3 changes: 2 additions & 1 deletion sound/soc/codecs/max98090.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ static void max98090_shdn_restore_locked(struct max98090_priv *max98090)

static void max98090_shdn_save(struct max98090_priv *max98090)
{
mutex_lock(&max98090->component->card->dapm_mutex);
mutex_lock_nested(&max98090->component->card->dapm_mutex,
SND_SOC_DAPM_CLASS_RUNTIME);
max98090_shdn_save_locked(max98090);
}

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/rt1015.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ static const char * const rt1015_boost_mode[] = {
"Bypass", "Adaptive", "Fixed Adaptive"
};

static const SOC_ENUM_SINGLE_DECL(rt1015_boost_mode_enum, 0, 0,
static SOC_ENUM_SINGLE_DECL(rt1015_boost_mode_enum, 0, 0,
rt1015_boost_mode);

static int rt1015_boost_mode_get(struct snd_kcontrol *kcontrol,
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/rt1308-sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ static const struct sdw_device_id rt1308_id[] = {
};
MODULE_DEVICE_TABLE(sdw, rt1308_id);

static int rt1308_dev_suspend(struct device *dev)
static int __maybe_unused rt1308_dev_suspend(struct device *dev)
{
struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(dev);

Expand All @@ -687,7 +687,7 @@ static int rt1308_dev_suspend(struct device *dev)

#define RT1308_PROBE_TIMEOUT 2000

static int rt1308_dev_resume(struct device *dev)
static int __maybe_unused rt1308_dev_resume(struct device *dev)
{
struct sdw_slave *slave = dev_to_sdw_dev(dev);
struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(dev);
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/rt700-sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ static const struct sdw_device_id rt700_id[] = {
};
MODULE_DEVICE_TABLE(sdw, rt700_id);

static int rt700_dev_suspend(struct device *dev)
static int __maybe_unused rt700_dev_suspend(struct device *dev)
{
struct rt700_priv *rt700 = dev_get_drvdata(dev);

Expand All @@ -500,7 +500,7 @@ static int rt700_dev_suspend(struct device *dev)

#define RT700_PROBE_TIMEOUT 2000

static int rt700_dev_resume(struct device *dev)
static int __maybe_unused rt700_dev_resume(struct device *dev)
{
struct sdw_slave *slave = dev_to_sdw_dev(dev);
struct rt700_priv *rt700 = dev_get_drvdata(dev);
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/rt711-sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ static const struct sdw_device_id rt711_id[] = {
};
MODULE_DEVICE_TABLE(sdw, rt711_id);

static int rt711_dev_suspend(struct device *dev)
static int __maybe_unused rt711_dev_suspend(struct device *dev)
{
struct rt711_priv *rt711 = dev_get_drvdata(dev);

Expand All @@ -501,7 +501,7 @@ static int rt711_dev_suspend(struct device *dev)

#define RT711_PROBE_TIMEOUT 2000

static int rt711_dev_resume(struct device *dev)
static int __maybe_unused rt711_dev_resume(struct device *dev)
{
struct sdw_slave *slave = dev_to_sdw_dev(dev);
struct rt711_priv *rt711 = dev_get_drvdata(dev);
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/rt715-sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ static const struct sdw_device_id rt715_id[] = {
};
MODULE_DEVICE_TABLE(sdw, rt715_id);

static int rt715_dev_suspend(struct device *dev)
static int __maybe_unused rt715_dev_suspend(struct device *dev)
{
struct rt715_priv *rt715 = dev_get_drvdata(dev);

Expand All @@ -563,7 +563,7 @@ static int rt715_dev_suspend(struct device *dev)

#define RT715_PROBE_TIMEOUT 2000

static int rt715_dev_resume(struct device *dev)
static int __maybe_unused rt715_dev_resume(struct device *dev)
{
struct sdw_slave *slave = dev_to_sdw_dev(dev);
struct rt715_priv *rt715 = dev_get_drvdata(dev);
Expand Down
14 changes: 7 additions & 7 deletions sound/soc/intel/boards/bxt_da7219_max98357a.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,12 +617,15 @@ static int bxt_card_late_probe(struct snd_soc_card *card)
snd_soc_dapm_add_routes(&card->dapm, broxton_map,
ARRAY_SIZE(broxton_map));

pcm = list_first_entry(&ctx->hdmi_pcm_list, struct bxt_hdmi_pcm,
head);
component = pcm->codec_dai->component;
if (list_empty(&ctx->hdmi_pcm_list))
return -EINVAL;

if (ctx->common_hdmi_codec_drv)
if (ctx->common_hdmi_codec_drv) {
pcm = list_first_entry(&ctx->hdmi_pcm_list, struct bxt_hdmi_pcm,
head);
component = pcm->codec_dai->component;
return hda_dsp_hdmi_build_controls(card, component);
}

list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
component = pcm->codec_dai->component;
Expand All @@ -643,9 +646,6 @@ static int bxt_card_late_probe(struct snd_soc_card *card)
i++;
}

if (!component)
return -EINVAL;

return hdac_hdmi_jack_port_init(component, &card->dapm);
}

Expand Down
14 changes: 7 additions & 7 deletions sound/soc/intel/boards/bxt_rt298.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,12 +529,15 @@ static int bxt_card_late_probe(struct snd_soc_card *card)
int err, i = 0;
char jack_name[NAME_SIZE];

pcm = list_first_entry(&ctx->hdmi_pcm_list, struct bxt_hdmi_pcm,
head);
component = pcm->codec_dai->component;
if (list_empty(&ctx->hdmi_pcm_list))
return -EINVAL;

if (ctx->common_hdmi_codec_drv)
if (ctx->common_hdmi_codec_drv) {
pcm = list_first_entry(&ctx->hdmi_pcm_list, struct bxt_hdmi_pcm,
head);
component = pcm->codec_dai->component;
return hda_dsp_hdmi_build_controls(card, component);
}

list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
component = pcm->codec_dai->component;
Expand All @@ -555,9 +558,6 @@ static int bxt_card_late_probe(struct snd_soc_card *card)
i++;
}

if (!component)
return -EINVAL;

return hdac_hdmi_jack_port_init(component, &card->dapm);
}

Expand Down
13 changes: 7 additions & 6 deletions sound/soc/intel/boards/cml_rt1011_rt5682.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,12 +241,15 @@ static int sof_card_late_probe(struct snd_soc_card *card)
struct hdmi_pcm *pcm;
int ret, i = 0;

pcm = list_first_entry(&ctx->hdmi_pcm_list, struct hdmi_pcm,
head);
component = pcm->codec_dai->component;
if (list_empty(&ctx->hdmi_pcm_list))
return -EINVAL;

if (ctx->common_hdmi_codec_drv)
if (ctx->common_hdmi_codec_drv) {
pcm = list_first_entry(&ctx->hdmi_pcm_list, struct hdmi_pcm,
head);
component = pcm->codec_dai->component;
return hda_dsp_hdmi_build_controls(card, component);
}

list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
component = pcm->codec_dai->component;
Expand All @@ -265,8 +268,6 @@ static int sof_card_late_probe(struct snd_soc_card *card)

i++;
}
if (!component)
return -EINVAL;

return hdac_hdmi_jack_port_init(component, &card->dapm);
}
Expand Down
16 changes: 8 additions & 8 deletions sound/soc/intel/boards/glk_rt5682_max98357a.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,15 +534,18 @@ static int glk_card_late_probe(struct snd_soc_card *card)
struct snd_soc_component *component = NULL;
char jack_name[NAME_SIZE];
struct glk_hdmi_pcm *pcm;
int err = 0;
int err;
int i = 0;

pcm = list_first_entry(&ctx->hdmi_pcm_list, struct glk_hdmi_pcm,
head);
component = pcm->codec_dai->component;
if (list_empty(&ctx->hdmi_pcm_list))
return -EINVAL;

if (ctx->common_hdmi_codec_drv)
if (ctx->common_hdmi_codec_drv) {
pcm = list_first_entry(&ctx->hdmi_pcm_list, struct glk_hdmi_pcm,
head);
component = pcm->codec_dai->component;
return hda_dsp_hdmi_build_controls(card, component);
}

list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
component = pcm->codec_dai->component;
Expand All @@ -563,9 +566,6 @@ static int glk_card_late_probe(struct snd_soc_card *card)
i++;
}

if (!component)
return -EINVAL;

return hdac_hdmi_jack_port_init(component, &card->dapm);
}

Expand Down
15 changes: 8 additions & 7 deletions sound/soc/intel/boards/sof_rt5682.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,19 +273,22 @@ static int sof_card_late_probe(struct snd_soc_card *card)
struct snd_soc_component *component = NULL;
char jack_name[NAME_SIZE];
struct sof_hdmi_pcm *pcm;
int err = 0;
int err;
int i = 0;

/* HDMI is not supported by SOF on Baytrail/CherryTrail */
if (is_legacy_cpu)
return 0;

pcm = list_first_entry(&ctx->hdmi_pcm_list, struct sof_hdmi_pcm,
head);
component = pcm->codec_dai->component;
if (list_empty(&ctx->hdmi_pcm_list))
return -EINVAL;

if (ctx->common_hdmi_codec_drv)
if (ctx->common_hdmi_codec_drv) {
pcm = list_first_entry(&ctx->hdmi_pcm_list, struct sof_hdmi_pcm,
head);
component = pcm->codec_dai->component;
return hda_dsp_hdmi_build_controls(card, component);
}

list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
component = pcm->codec_dai->component;
Expand All @@ -305,8 +308,6 @@ static int sof_card_late_probe(struct snd_soc_card *card)

i++;
}
if (!component)
return -EINVAL;

return hdac_hdmi_jack_port_init(component, &card->dapm);
}
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/common/soc-acpi-intel-icl-match.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static const u64 rt1308_2_adr[] = {
};

static const u64 rt715_3_adr[] = {
0x000310025D715000
0x000310025D071500
};

static const struct snd_soc_acpi_link_adr icl_3_in_1_default[] = {
Expand Down
Loading

0 comments on commit 9db0288

Please sign in to comment.