Commit 21b5954d authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge tag 'asoc-fix-v5.18' of...

Merge tag 'asoc-fix-v5.18' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v5.18

A few fixes that came in during the merge window, all fairly routine.
parents 6ddc2f74 664d66dc
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -107,6 +107,7 @@ int mt6358_set_mtkaif_protocol(struct snd_soc_component *cmpnt,
	priv->mtkaif_protocol = mtkaif_protocol;
	priv->mtkaif_protocol = mtkaif_protocol;
	return 0;
	return 0;
}
}
EXPORT_SYMBOL_GPL(mt6358_set_mtkaif_protocol);


static void playback_gpio_set(struct mt6358_priv *priv)
static void playback_gpio_set(struct mt6358_priv *priv)
{
{
@@ -273,6 +274,7 @@ int mt6358_mtkaif_calibration_enable(struct snd_soc_component *cmpnt)
			   1 << RG_AUD_PAD_TOP_DAT_MISO_LOOPBACK_SFT);
			   1 << RG_AUD_PAD_TOP_DAT_MISO_LOOPBACK_SFT);
	return 0;
	return 0;
}
}
EXPORT_SYMBOL_GPL(mt6358_mtkaif_calibration_enable);


int mt6358_mtkaif_calibration_disable(struct snd_soc_component *cmpnt)
int mt6358_mtkaif_calibration_disable(struct snd_soc_component *cmpnt)
{
{
@@ -296,6 +298,7 @@ int mt6358_mtkaif_calibration_disable(struct snd_soc_component *cmpnt)
	capture_gpio_reset(priv);
	capture_gpio_reset(priv);
	return 0;
	return 0;
}
}
EXPORT_SYMBOL_GPL(mt6358_mtkaif_calibration_disable);


int mt6358_set_mtkaif_calibration_phase(struct snd_soc_component *cmpnt,
int mt6358_set_mtkaif_calibration_phase(struct snd_soc_component *cmpnt,
					int phase_1, int phase_2)
					int phase_1, int phase_2)
@@ -310,6 +313,7 @@ int mt6358_set_mtkaif_calibration_phase(struct snd_soc_component *cmpnt,
			   phase_2 << RG_AUD_PAD_TOP_PHASE_MODE2_SFT);
			   phase_2 << RG_AUD_PAD_TOP_PHASE_MODE2_SFT);
	return 0;
	return 0;
}
}
EXPORT_SYMBOL_GPL(mt6358_set_mtkaif_calibration_phase);


/* dl pga gain */
/* dl pga gain */
enum {
enum {
+4 −8
Original line number Original line Diff line number Diff line
@@ -462,11 +462,9 @@ static int hp_jack_event(struct notifier_block *nb, unsigned long event,


	if (event & SND_JACK_HEADPHONE)
	if (event & SND_JACK_HEADPHONE)
		/* Disable speaker if headphone is plugged in */
		/* Disable speaker if headphone is plugged in */
		snd_soc_dapm_disable_pin(dapm, "Ext Spk");
		return snd_soc_dapm_disable_pin(dapm, "Ext Spk");
	else
	else
		snd_soc_dapm_enable_pin(dapm, "Ext Spk");
		return snd_soc_dapm_enable_pin(dapm, "Ext Spk");

	return 0;
}
}


static struct notifier_block hp_jack_nb = {
static struct notifier_block hp_jack_nb = {
@@ -481,11 +479,9 @@ static int mic_jack_event(struct notifier_block *nb, unsigned long event,


	if (event & SND_JACK_MICROPHONE)
	if (event & SND_JACK_MICROPHONE)
		/* Disable dmic if microphone is plugged in */
		/* Disable dmic if microphone is plugged in */
		snd_soc_dapm_disable_pin(dapm, "DMIC");
		return snd_soc_dapm_disable_pin(dapm, "DMIC");
	else
	else
		snd_soc_dapm_enable_pin(dapm, "DMIC");
		return snd_soc_dapm_enable_pin(dapm, "DMIC");

	return 0;
}
}


static struct notifier_block mic_jack_nb = {
static struct notifier_block mic_jack_nb = {
+5 −5
Original line number Original line Diff line number Diff line
@@ -469,14 +469,14 @@ static int rockchip_i2s_tdm_set_fmt(struct snd_soc_dai *cpu_dai,
		txcr_val = I2S_TXCR_IBM_NORMAL;
		txcr_val = I2S_TXCR_IBM_NORMAL;
		rxcr_val = I2S_RXCR_IBM_NORMAL;
		rxcr_val = I2S_RXCR_IBM_NORMAL;
		break;
		break;
	case SND_SOC_DAIFMT_DSP_A: /* PCM no delay mode */
	case SND_SOC_DAIFMT_DSP_A: /* PCM delay 1 mode */
		txcr_val = I2S_TXCR_TFS_PCM;
		rxcr_val = I2S_RXCR_TFS_PCM;
		break;
	case SND_SOC_DAIFMT_DSP_B: /* PCM delay 1 mode */
		txcr_val = I2S_TXCR_TFS_PCM | I2S_TXCR_PBM_MODE(1);
		txcr_val = I2S_TXCR_TFS_PCM | I2S_TXCR_PBM_MODE(1);
		rxcr_val = I2S_RXCR_TFS_PCM | I2S_RXCR_PBM_MODE(1);
		rxcr_val = I2S_RXCR_TFS_PCM | I2S_RXCR_PBM_MODE(1);
		break;
		break;
	case SND_SOC_DAIFMT_DSP_B: /* PCM no delay mode */
		txcr_val = I2S_TXCR_TFS_PCM;
		rxcr_val = I2S_RXCR_TFS_PCM;
		break;
	default:
	default:
		ret = -EINVAL;
		ret = -EINVAL;
		goto err_pm_put;
		goto err_pm_put;
+1 −0
Original line number Original line Diff line number Diff line
@@ -84,6 +84,7 @@ if SND_SOC_SOF_PCI
config SND_SOC_SOF_MERRIFIELD
config SND_SOC_SOF_MERRIFIELD
	tristate "SOF support for Tangier/Merrifield"
	tristate "SOF support for Tangier/Merrifield"
	default SND_SOC_SOF_PCI
	default SND_SOC_SOF_PCI
	select SND_SOC_SOF_PCI_DEV
	select SND_SOC_SOF_INTEL_ATOM_HIFI_EP
	select SND_SOC_SOF_INTEL_ATOM_HIFI_EP
	help
	help
	  This adds support for Sound Open Firmware for Intel(R) platforms
	  This adds support for Sound Open Firmware for Intel(R) platforms