Commit f850a2b1 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

Merge tag 'asoc-fix-v6.1-rc2' of...

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

ASoC: Fixes for v6.1

Quite a few fixes here, a lot driver specific, plus some new quirks.
There was a bit of a mess with the runtime PM handling due to some
confusion in the API there which resulted in a number of commits and
reverts but that should all be stable now.
parents 50895a55 e9441675
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -177,6 +177,7 @@ void asoc_simple_convert_fixup(struct asoc_simple_data *data,
				      struct snd_pcm_hw_params *params);
void asoc_simple_parse_convert(struct device_node *np, char *prefix,
			       struct asoc_simple_data *data);
bool asoc_simple_is_convert_required(const struct asoc_simple_data *data);

int asoc_simple_parse_routing(struct snd_soc_card *card,
				      char *prefix);
+21 −0
Original line number Diff line number Diff line
@@ -45,6 +45,27 @@ static struct snd_soc_card acp6x_card = {
};

static const struct dmi_system_id yc_acp_quirk_table[] = {
	{
		.driver_data = &acp6x_card,
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "21D0"),
		}
	},
	{
		.driver_data = &acp6x_card,
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "21D0"),
		}
	},
	{
		.driver_data = &acp6x_card,
		.matches = {
			DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
			DMI_MATCH(DMI_PRODUCT_NAME, "21D1"),
		}
	},
	{
		.driver_data = &acp6x_card,
		.matches = {
+1 −0
Original line number Diff line number Diff line
@@ -1629,6 +1629,7 @@ config SND_SOC_TFA989X
config SND_SOC_TLV320ADC3XXX
	tristate "Texas Instruments TLV320ADC3001/3101 audio ADC"
	depends on I2C
	depends on GPIOLIB
	help
	 Enable support for Texas Instruments TLV320ADC3001 and TLV320ADC3101
	 ADCs.
+1 −1
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@
#define CX2072X_PLBK_DRC_PARM_LEN	9
#define CX2072X_CLASSD_AMP_LEN		6

/* DAI interfae type */
/* DAI interface type */
#define CX2072X_DAI_HIFI	1
#define CX2072X_DAI_DSP		2
#define CX2072X_DAI_DSP_PWM	3 /* 4 ch, including mic and AEC */
+19 −15
Original line number Diff line number Diff line
@@ -136,14 +136,17 @@ enum {
#define REG_CGR3_GO1L_OFFSET		0
#define REG_CGR3_GO1L_MASK		(0x1f << REG_CGR3_GO1L_OFFSET)

#define REG_CGR10_GIL_OFFSET		0
#define REG_CGR10_GIR_OFFSET		4

struct jz_icdc {
	struct regmap *regmap;
	void __iomem *base;
	struct clk *clk;
};

static const SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(jz4725b_dac_tlv, -2250, 0);
static const SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(jz4725b_line_tlv, -1500, 600);
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(jz4725b_adc_tlv,     0, 150, 0);
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(jz4725b_dac_tlv, -2250, 150, 0);

static const struct snd_kcontrol_new jz4725b_codec_controls[] = {
	SOC_DOUBLE_TLV("Master Playback Volume",
@@ -151,11 +154,11 @@ static const struct snd_kcontrol_new jz4725b_codec_controls[] = {
		       REG_CGR1_GODL_OFFSET,
		       REG_CGR1_GODR_OFFSET,
		       0xf, 1, jz4725b_dac_tlv),
	SOC_DOUBLE_R_TLV("Master Capture Volume",
			 JZ4725B_CODEC_REG_CGR3,
			 JZ4725B_CODEC_REG_CGR2,
			 REG_CGR2_GO1R_OFFSET,
			 0x1f, 1, jz4725b_line_tlv),
	SOC_DOUBLE_TLV("Master Capture Volume",
		       JZ4725B_CODEC_REG_CGR10,
		       REG_CGR10_GIL_OFFSET,
		       REG_CGR10_GIR_OFFSET,
		       0xf, 0, jz4725b_adc_tlv),

	SOC_SINGLE("Master Playback Switch", JZ4725B_CODEC_REG_CR1,
		   REG_CR1_DAC_MUTE_OFFSET, 1, 1),
@@ -180,7 +183,7 @@ static SOC_VALUE_ENUM_SINGLE_DECL(jz4725b_codec_adc_src_enum,
				  jz4725b_codec_adc_src_texts,
				  jz4725b_codec_adc_src_values);
static const struct snd_kcontrol_new jz4725b_codec_adc_src_ctrl =
			SOC_DAPM_ENUM("Route", jz4725b_codec_adc_src_enum);
	SOC_DAPM_ENUM("ADC Source Capture Route", jz4725b_codec_adc_src_enum);

static const struct snd_kcontrol_new jz4725b_codec_mixer_controls[] = {
	SOC_DAPM_SINGLE("Line In Bypass", JZ4725B_CODEC_REG_CR1,
@@ -225,7 +228,7 @@ static const struct snd_soc_dapm_widget jz4725b_codec_dapm_widgets[] = {
	SND_SOC_DAPM_ADC("ADC", "Capture",
			 JZ4725B_CODEC_REG_PMR1, REG_PMR1_SB_ADC_OFFSET, 1),

	SND_SOC_DAPM_MUX("ADC Source", SND_SOC_NOPM, 0, 0,
	SND_SOC_DAPM_MUX("ADC Source Capture Route", SND_SOC_NOPM, 0, 0,
			 &jz4725b_codec_adc_src_ctrl),

	/* Mixer */
@@ -236,7 +239,8 @@ static const struct snd_soc_dapm_widget jz4725b_codec_dapm_widgets[] = {
	SND_SOC_DAPM_MIXER("DAC to Mixer", JZ4725B_CODEC_REG_CR1,
			   REG_CR1_DACSEL_OFFSET, 0, NULL, 0),

	SND_SOC_DAPM_MIXER("Line In", SND_SOC_NOPM, 0, 0, NULL, 0),
	SND_SOC_DAPM_MIXER("Line In", JZ4725B_CODEC_REG_PMR1,
			   REG_PMR1_SB_LIN_OFFSET, 1, NULL, 0),
	SND_SOC_DAPM_MIXER("HP Out", JZ4725B_CODEC_REG_CR1,
			   REG_CR1_HP_DIS_OFFSET, 1, NULL, 0),

@@ -283,11 +287,11 @@ static const struct snd_soc_dapm_route jz4725b_codec_dapm_routes[] = {
	{"Mixer", NULL, "DAC to Mixer"},

	{"Mixer to ADC", NULL, "Mixer"},
	{"ADC Source", "Mixer", "Mixer to ADC"},
	{"ADC Source", "Line In", "Line In"},
	{"ADC Source", "Mic 1", "Mic 1"},
	{"ADC Source", "Mic 2", "Mic 2"},
	{"ADC", NULL, "ADC Source"},
	{"ADC Source Capture Route", "Mixer", "Mixer to ADC"},
	{"ADC Source Capture Route", "Line In", "Line In"},
	{"ADC Source Capture Route", "Mic 1", "Mic 1"},
	{"ADC Source Capture Route", "Mic 2", "Mic 2"},
	{"ADC", NULL, "ADC Source Capture Route"},

	{"Out Stage", NULL, "Mixer"},
	{"HP Out", NULL, "Out Stage"},
Loading