Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 428157c1 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086',...

Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tas5086', 'asoc/topic/tegra', 'asoc/topic/tlv' and 'asoc/topic/topology' into asoc-next
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -89,6 +89,13 @@ struct snd_soc_tplg_kcontrol_ops {
		struct snd_ctl_elem_info *uinfo);
};

/* Bytes ext operations, for TLV byte controls */
struct snd_soc_tplg_bytes_ext_ops {
	u32 id;
	int (*get)(unsigned int __user *bytes, unsigned int size);
	int (*put)(const unsigned int __user *bytes, unsigned int size);
};

/*
 * DAPM widget event handlers - used to map handlers onto widgets.
 */
@@ -136,9 +143,13 @@ struct snd_soc_tplg_ops {
	int (*manifest)(struct snd_soc_component *,
		struct snd_soc_tplg_manifest *);

	/* bespoke kcontrol handlers available for binding */
	/* vendor specific kcontrol handlers available for binding */
	const struct snd_soc_tplg_kcontrol_ops *io_ops;
	int io_ops_count;

	/* vendor specific bytes ext handlers available for binding */
	const struct snd_soc_tplg_bytes_ext_ops *bytes_ext_ops;
	int bytes_ext_ops_count;
};

#ifdef CONFIG_SND_SOC_TOPOLOGY
+12 −16
Original line number Diff line number Diff line
@@ -156,33 +156,29 @@ static const DECLARE_TLV_DB_SCALE(dpga_tlv, -9450, 150, 1);
static const DECLARE_TLV_DB_SCALE(adc_tlv, -900, 300, 0);

/* {-23, -17, -13.5, -11, -9, -6, -3, 0}dB */
static const unsigned int mic_tlv[] = {
	TLV_DB_RANGE_HEAD(5),
static const DECLARE_TLV_DB_RANGE(mic_tlv,
	0, 0, TLV_DB_SCALE_ITEM(-2300, 0, 0),
	1, 1, TLV_DB_SCALE_ITEM(-1700, 0, 0),
	2, 2, TLV_DB_SCALE_ITEM(-1350, 0, 0),
	3, 3, TLV_DB_SCALE_ITEM(-1100, 0, 0),
	4, 7, TLV_DB_SCALE_ITEM(-900, 300, 0),
};
	4, 7, TLV_DB_SCALE_ITEM(-900, 300, 0)
);

/* {0, 0, 0, -6, 0, 6, 12, 18}dB */
static const unsigned int aux_tlv[] = {
	TLV_DB_RANGE_HEAD(2),
static const DECLARE_TLV_DB_RANGE(aux_tlv,
	0, 2, TLV_DB_SCALE_ITEM(0, 0, 0),
	3, 7, TLV_DB_SCALE_ITEM(-600, 600, 0),
};
	3, 7, TLV_DB_SCALE_ITEM(-600, 600, 0)
);

/* {-16, -13, -10, -7, -5.2, -3,3, -2.2, 0}dB, mute instead of -16dB */
static const unsigned int out_tlv[] = {
	TLV_DB_RANGE_HEAD(4),
static const DECLARE_TLV_DB_RANGE(out_tlv,
	0, 3, TLV_DB_SCALE_ITEM(-1600, 300, 1),
	4, 4, TLV_DB_SCALE_ITEM(-520, 0, 0),
	5, 5, TLV_DB_SCALE_ITEM(-330, 0, 0),
	6, 7, TLV_DB_SCALE_ITEM(-220, 220, 0),
};
	6, 7, TLV_DB_SCALE_ITEM(-220, 220, 0)
);

static const unsigned int st_tlv[] = {
	TLV_DB_RANGE_HEAD(8),
static const DECLARE_TLV_DB_RANGE(st_tlv,
	0, 1, TLV_DB_SCALE_ITEM(-12041, 602, 0),
	2, 3, TLV_DB_SCALE_ITEM(-11087, 250, 0),
	4, 5, TLV_DB_SCALE_ITEM(-10643, 158, 0),
@@ -190,8 +186,8 @@ static const unsigned int st_tlv[] = {
	8, 9, TLV_DB_SCALE_ITEM(-10133, 92, 0),
	10, 13, TLV_DB_SCALE_ITEM(-9958, 70, 0),
	14, 17, TLV_DB_SCALE_ITEM(-9689, 53, 0),
	18, 271, TLV_DB_SCALE_ITEM(-9484, 37, 0),
};
	18, 271, TLV_DB_SCALE_ITEM(-9484, 37, 0)
);

/* Sidetone Gain = M * 2^(-5-N) */
struct st_gain {
+3 −4
Original line number Diff line number Diff line
@@ -1335,11 +1335,10 @@ static DECLARE_TLV_DB_SCALE(dax_dig_gain_tlv, -6300, 100, 1);
static DECLARE_TLV_DB_SCALE(hs_ear_dig_gain_tlv, -100, 100, 1);
/* -1dB = Mute */

static const unsigned int hs_gain_tlv[] = {
	TLV_DB_RANGE_HEAD(2),
static const DECLARE_TLV_DB_RANGE(hs_gain_tlv,
	0, 3, TLV_DB_SCALE_ITEM(-3200, 400, 0),
	4, 15, TLV_DB_SCALE_ITEM(-1800, 200, 0),
};
	4, 15, TLV_DB_SCALE_ITEM(-1800, 200, 0)
);

static DECLARE_TLV_DB_SCALE(mic_gain_tlv, 0, 100, 0);

+9 −12
Original line number Diff line number Diff line
@@ -320,13 +320,12 @@ static const struct reg_default adau1373_reg_defaults[] = {
	{ ADAU1373_DIGEN,		0x00 },
};

static const unsigned int adau1373_out_tlv[] = {
	TLV_DB_RANGE_HEAD(4),
static const DECLARE_TLV_DB_RANGE(adau1373_out_tlv,
	0, 7, TLV_DB_SCALE_ITEM(-7900, 400, 1),
	8, 15, TLV_DB_SCALE_ITEM(-4700, 300, 0),
	16, 23, TLV_DB_SCALE_ITEM(-2300, 200, 0),
	24, 31, TLV_DB_SCALE_ITEM(-700, 100, 0),
};
	24, 31, TLV_DB_SCALE_ITEM(-700, 100, 0)
);

static const DECLARE_TLV_DB_MINMAX(adau1373_digital_tlv, -9563, 0);
static const DECLARE_TLV_DB_SCALE(adau1373_in_pga_tlv, -1300, 100, 1);
@@ -381,12 +380,11 @@ static const char *adau1373_bass_hpf_cutoff_text[] = {
	"158Hz", "232Hz", "347Hz", "520Hz",
};

static const unsigned int adau1373_bass_tlv[] = {
	TLV_DB_RANGE_HEAD(3),
static const DECLARE_TLV_DB_RANGE(adau1373_bass_tlv,
	0, 2, TLV_DB_SCALE_ITEM(-600, 600, 1),
	3, 4, TLV_DB_SCALE_ITEM(950, 250, 0),
	5, 7, TLV_DB_SCALE_ITEM(1400, 150, 0),
};
	5, 7, TLV_DB_SCALE_ITEM(1400, 150, 0)
);

static SOC_ENUM_SINGLE_DECL(adau1373_bass_lpf_cutoff_enum,
	ADAU1373_BASS1, 5, adau1373_bass_lpf_cutoff_text);
@@ -414,11 +412,10 @@ static SOC_ENUM_SINGLE_DECL(adau1373_3d_level_enum,
static SOC_ENUM_SINGLE_DECL(adau1373_3d_cutoff_enum,
	ADAU1373_3D_CTRL1, 0, adau1373_3d_cutoff_text);

static const unsigned int adau1373_3d_tlv[] = {
	TLV_DB_RANGE_HEAD(2),
static const DECLARE_TLV_DB_RANGE(adau1373_3d_tlv,
	0, 0, TLV_DB_SCALE_ITEM(0, 0, 0),
	1, 7, TLV_DB_LINEAR_ITEM(-1800, -120),
};
	1, 7, TLV_DB_LINEAR_ITEM(-1800, -120)
);

static const char *adau1373_lr_mux_text[] = {
	"Mute",
+3 −4
Original line number Diff line number Diff line
@@ -82,12 +82,11 @@ static int amp_mixer_event(struct snd_soc_dapm_widget *w,
static const DECLARE_TLV_DB_SCALE(vol_tlv, -3450, 150, 0);
static const DECLARE_TLV_DB_SCALE(hp_tlv, -4650, 150, 0);
static const DECLARE_TLV_DB_SCALE(adc_rec_tlv, -1650, 150, 0);
static const unsigned int boost_tlv[] = {
	TLV_DB_RANGE_HEAD(3),
static const DECLARE_TLV_DB_RANGE(boost_tlv,
	0, 0, TLV_DB_SCALE_ITEM(0, 0, 0),
	1, 1, TLV_DB_SCALE_ITEM(2000, 0, 0),
	2, 2, TLV_DB_SCALE_ITEM(3000, 0, 0),
};
	2, 2, TLV_DB_SCALE_ITEM(3000, 0, 0)
);
static const DECLARE_TLV_DB_SCALE(dig_tlv, 0, 600, 0);

static const struct snd_kcontrol_new alc5621_vol_snd_controls[] = {
Loading