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

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

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

ASoC: Fixes for v5.8

A small pile of fixes that came in during the merge window, the DPCM
fixes from Pierre are the most notable thing here.
parents 951e2736 44ce45f8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -14,8 +14,8 @@ For instance:
	dai-tdm-slot-tx-mask = <0 1>;
	dai-tdm-slot-rx-mask = <1 0>;

And for each spcified driver, there could be one .of_xlate_tdm_slot_mask()
to specify a explicit mapping of the channels and the slots. If it's absent
And for each specified driver, there could be one .of_xlate_tdm_slot_mask()
to specify an explicit mapping of the channels and the slots. If it's absent
the default snd_soc_of_xlate_tdm_slot_mask() will be used to generating the
tx and rx masks.

+21 −5
Original line number Diff line number Diff line
@@ -754,6 +754,7 @@ static struct snd_soc_dai_driver max98390_dai[] = {
static int max98390_dsm_init(struct snd_soc_component *component)
{
	int ret;
	int param_size, param_start_addr;
	char filename[128];
	const char *vendor, *product;
	struct max98390_priv *max98390 =
@@ -778,16 +779,31 @@ static int max98390_dsm_init(struct snd_soc_component *component)
	}

	dev_dbg(component->dev,
		"max98390: param fw size %ld\n",
		"max98390: param fw size %zd\n",
		fw->size);
	if (fw->size < MAX98390_DSM_PARAM_MIN_SIZE) {
		dev_err(component->dev,
			"param fw is invalid.\n");
		goto err_alloc;
	}
	dsm_param = (char *)fw->data;
	param_start_addr = (dsm_param[0] & 0xff) | (dsm_param[1] & 0xff) << 8;
	param_size = (dsm_param[2] & 0xff) | (dsm_param[3] & 0xff) << 8;
	if (param_size > MAX98390_DSM_PARAM_MAX_SIZE ||
		param_start_addr < DSM_STBASS_HPF_B0_BYTE0 ||
		fw->size < param_size + MAX98390_DSM_PAYLOAD_OFFSET) {
		dev_err(component->dev,
			"param fw is invalid.\n");
		goto err_alloc;
	}
	regmap_write(max98390->regmap, MAX98390_R203A_AMP_EN, 0x80);
	dsm_param += MAX98390_DSM_PAYLOAD_OFFSET;
	regmap_bulk_write(max98390->regmap, DSM_EQ_BQ1_B0_BYTE0,
		dsm_param,
		fw->size - MAX98390_DSM_PAYLOAD_OFFSET);
	release_firmware(fw);
	regmap_bulk_write(max98390->regmap, param_start_addr,
		dsm_param, param_size);
	regmap_write(max98390->regmap, MAX98390_R23E1_DSP_GLOBAL_EN, 0x01);

err_alloc:
	release_firmware(fw);
err:
	return ret;
}
+2 −1
Original line number Diff line number Diff line
@@ -650,7 +650,8 @@

/* DSM register offset */
#define MAX98390_DSM_PAYLOAD_OFFSET 16
#define MAX98390_DSM_PAYLOAD_OFFSET_2 495
#define MAX98390_DSM_PARAM_MAX_SIZE 770
#define MAX98390_DSM_PARAM_MIN_SIZE 670

struct max98390_priv {
	struct regmap *regmap;
+2 −2
Original line number Diff line number Diff line
@@ -80,8 +80,8 @@ int rl6231_calc_dmic_clk(int rate)
	for (i = 0; i < ARRAY_SIZE(div); i++) {
		if ((div[i] % 3) == 0)
			continue;
		/* find divider that gives DMIC frequency below 3.072MHz */
		if (3072000 * div[i] >= rate)
		/* find divider that gives DMIC frequency below 1.536MHz */
		if (1536000 * div[i] >= rate)
			return i;
	}

+14 −0
Original line number Diff line number Diff line
@@ -3625,6 +3625,12 @@ static const struct rt5645_platform_data asus_t100ha_platform_data = {
	.inv_jd1_1 = true,
};

static const struct rt5645_platform_data asus_t101ha_platform_data = {
	.dmic1_data_pin = RT5645_DMIC_DATA_IN2N,
	.dmic2_data_pin = RT5645_DMIC2_DISABLE,
	.jd_mode = 3,
};

static const struct rt5645_platform_data lenovo_ideapad_miix_310_pdata = {
	.jd_mode = 3,
	.in2_diff = true,
@@ -3708,6 +3714,14 @@ static const struct dmi_system_id dmi_platform_data[] = {
		},
		.driver_data = (void *)&asus_t100ha_platform_data,
	},
	{
		.ident = "ASUS T101HA",
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
			DMI_MATCH(DMI_PRODUCT_NAME, "T101HA"),
		},
		.driver_data = (void *)&asus_t101ha_platform_data,
	},
	{
		.ident = "MINIX Z83-4",
		.matches = {
Loading