Unverified Commit d143a69f authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branch 'asoc/for-5.12' into asoc-linus

parents bf05bf16 a89f3a93
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -264,8 +264,7 @@ static struct snd_soc_dai_driver acp3x_i2s_dai = {
	.playback = {
		.rates = SNDRV_PCM_RATE_8000_96000,
		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
			SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S24_LE |
			SNDRV_PCM_FMTBIT_S32_LE,
			SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S32_LE,
		.channels_min = 2,
		.channels_max = 8,
		.rate_min = 8000,
@@ -274,8 +273,7 @@ static struct snd_soc_dai_driver acp3x_i2s_dai = {
	.capture = {
		.rates = SNDRV_PCM_RATE_8000_48000,
		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
			SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S24_LE |
			SNDRV_PCM_FMTBIT_S32_LE,
			SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S32_LE,
		.channels_min = 2,
		.channels_max = 2,
		.rate_min = 8000,
+2 −4
Original line number Diff line number Diff line
@@ -24,8 +24,7 @@ static const struct snd_pcm_hardware acp3x_pcm_hardware_playback = {
		SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
		SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME,
	.formats = SNDRV_PCM_FMTBIT_S16_LE |  SNDRV_PCM_FMTBIT_S8 |
		   SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S24_LE |
		   SNDRV_PCM_FMTBIT_S32_LE,
		   SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S32_LE,
	.channels_min = 2,
	.channels_max = 8,
	.rates = SNDRV_PCM_RATE_8000_96000,
@@ -45,8 +44,7 @@ static const struct snd_pcm_hardware acp3x_pcm_hardware_capture = {
		SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
		SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME,
	.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 |
		   SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S24_LE |
		   SNDRV_PCM_FMTBIT_S32_LE,
		   SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S32_LE,
	.channels_min = 2,
	.channels_max = 2,
	.rates = SNDRV_PCM_RATE_8000_48000,
+11 −2
Original line number Diff line number Diff line
@@ -553,6 +553,7 @@ static int adau17x1_set_dai_fmt(struct snd_soc_dai *dai,
{
	struct adau *adau = snd_soc_component_get_drvdata(dai->component);
	unsigned int ctrl0, ctrl1;
	unsigned int ctrl0_mask;
	int lrclk_pol;

	switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
@@ -612,8 +613,16 @@ static int adau17x1_set_dai_fmt(struct snd_soc_dai *dai,
	if (lrclk_pol)
		ctrl0 |= ADAU17X1_SERIAL_PORT0_LRCLK_POL;

	regmap_write(adau->regmap, ADAU17X1_SERIAL_PORT0, ctrl0);
	regmap_write(adau->regmap, ADAU17X1_SERIAL_PORT1, ctrl1);
	/* Set the mask to update all relevant bits in ADAU17X1_SERIAL_PORT0 */
	ctrl0_mask = ADAU17X1_SERIAL_PORT0_MASTER |
		     ADAU17X1_SERIAL_PORT0_LRCLK_POL |
		     ADAU17X1_SERIAL_PORT0_BCLK_POL |
		     ADAU17X1_SERIAL_PORT0_PULSE_MODE;

	regmap_update_bits(adau->regmap, ADAU17X1_SERIAL_PORT0, ctrl0_mask,
			   ctrl0);
	regmap_update_bits(adau->regmap, ADAU17X1_SERIAL_PORT1,
			   ADAU17X1_SERIAL_PORT1_DELAY_MASK, ctrl1);

	adau->dai_fmt = fmt & SND_SOC_DAIFMT_FORMAT_MASK;

+2 −14
Original line number Diff line number Diff line
@@ -2239,18 +2239,9 @@ static int rt1011_calibrate(struct rt1011_priv *rt1011, unsigned char cali_flag)
	dc_offset |= (value & 0xffff);
	dev_info(dev, "Gain1 offset=0x%x\n", dc_offset);

	/* check the package info. */
	regmap_read(rt1011->regmap, RT1011_EFUSE_MATCH_DONE, &value);
	if (value & 0x4)
		rt1011->pack_id = 1;

	if (cali_flag) {

		if (rt1011->pack_id)
			regmap_write(rt1011->regmap, RT1011_ADC_SET_1, 0x292c);
		else
		regmap_write(rt1011->regmap, RT1011_ADC_SET_1, 0x2925);

		/* Class D on */
		regmap_write(rt1011->regmap, RT1011_CLASS_D_POS, 0x010e);
		regmap_write(rt1011->regmap,
@@ -2376,9 +2367,6 @@ static void rt1011_calibration_work(struct work_struct *work)
		rt1011_r0_load(rt1011);
	}

	if (rt1011->pack_id)
		snd_soc_component_write(component, RT1011_ADC_SET_1, 0x292c);
	else
	snd_soc_component_write(component, RT1011_ADC_SET_1, 0x2925);
}

+0 −1
Original line number Diff line number Diff line
@@ -692,7 +692,6 @@ struct rt1011_priv {
	unsigned int r0_reg, cali_done;
	unsigned int r0_calib, temperature_calib;
	int recv_spk_mode;
	unsigned int pack_id; /* 0: WLCSP; 1: QFN */
};

#endif		/* end of _RT1011_H_ */
Loading