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

Commit e87fb3b1 authored by Mark Brown's avatar Mark Brown
Browse files

Merge tag 'asoc-fix-v4.5-rc6' into asoc-linus

ASoC: Fixes for v4.5

This is far too big a set of fixes for this late in the release cycle
but the overwhelming bulk is essentially the same simple fix from
Takashi for a cut'n'pasted 64 bit cleanliness issue in the userspace
interface where drivers were accessing things using the wrong element in
a union which worked OK on 32 bit platforms as the correct element
happened to be aligned the same way but with 64 bit platforms ABIs are
different and the two members of the union are laid out in different
places.  They aren't all tagged to stable since some of these chips have
vanishingly little chance of being used in 64 bit systems.

The other changes are:
 - A fix for Qualcomm devices to work on big endian systems.  The
   original change is actually correct but triggered a bug in regmap
   which is too invasive to fix for this cycle and can be worked around
   by just letting regmap pick the default.
 - A fix for the Samsung I2S driver locking which wasn't using IRQ safe
   spinlocks when it needed to.
 - A fix for the new Intel Sky Lake driver forgetting that C pointer
   arithmetic takes the type of the pointer into consideration.
 - A revert of a change to the FSL SSI driver that broke some systems.
 - A fix for the cleanup path of the wm9713 driver.
 - A fix for some incorrect register definitions in the ADAU17x1 driver
   that caused misclocking in some configurations.
 - A fix for the tracepoints for jack detection to avoid using an
   internal field of the core jack structure which is no longer present
   in all configurations.
 - A fix for another of the new Intel drivers which tried to write to a
   string literal.

# gpg: Signature made Mon 07 Mar 2016 09:41:48 ICT using RSA key ID 5D5487D0
# gpg: key CD7BEEBC: no public key for trusted key - skipped
# gpg: key CD7BEEBC marked as ultimately trusted
# gpg: key AF88CD16: no public key for trusted key - skipped
# gpg: key AF88CD16 marked as ultimately trusted
# gpg: key 16005C11: no public key for trusted key - skipped
# gpg: key 16005C11 marked as ultimately trusted
# gpg: key 5621E907: no public key for trusted key - skipped
# gpg: key 5621E907 marked as ultimately trusted
# gpg: key 5C6153AD: no public key for trusted key - skipped
# gpg: key 5C6153AD marked as ultimately trusted
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg:                 aka "Mark Brown <broonie@debian.org>"
# gpg:                 aka "Mark Brown <broonie@kernel.org>"
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg:                 aka "Mark Brown <broonie@linaro.org>"
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>"
parents f6cede5b 02db17ff
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -231,13 +231,13 @@ TRACE_EVENT(snd_soc_jack_report,
	TP_ARGS(jack, mask, val),
	TP_ARGS(jack, mask, val),


	TP_STRUCT__entry(
	TP_STRUCT__entry(
		__string(	name,		jack->jack->name	)
		__string(	name,		jack->jack->id		)
		__field(	int,		mask			)
		__field(	int,		mask			)
		__field(	int,		val			)
		__field(	int,		val			)
	),
	),


	TP_fast_assign(
	TP_fast_assign(
		__assign_str(name, jack->jack->name);
		__assign_str(name, jack->jack->id);
		__entry->mask = mask;
		__entry->mask = mask;
		__entry->val = val;
		__entry->val = val;
	),
	),
@@ -253,12 +253,12 @@ TRACE_EVENT(snd_soc_jack_notify,
	TP_ARGS(jack, val),
	TP_ARGS(jack, val),


	TP_STRUCT__entry(
	TP_STRUCT__entry(
		__string(	name,		jack->jack->name	)
		__string(	name,		jack->jack->id		)
		__field(	int,		val			)
		__field(	int,		val			)
	),
	),


	TP_fast_assign(
	TP_fast_assign(
		__assign_str(name, jack->jack->name);
		__assign_str(name, jack->jack->id);
		__entry->val = val;
		__entry->val = val;
	),
	),


+4 −4
Original line number Original line Diff line number Diff line
@@ -1130,7 +1130,7 @@ static int sid_status_control_get(struct snd_kcontrol *kcontrol,
	struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev);
	struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev);


	mutex_lock(&drvdata->ctrl_lock);
	mutex_lock(&drvdata->ctrl_lock);
	ucontrol->value.integer.value[0] = drvdata->sid_status;
	ucontrol->value.enumerated.item[0] = drvdata->sid_status;
	mutex_unlock(&drvdata->ctrl_lock);
	mutex_unlock(&drvdata->ctrl_lock);


	return 0;
	return 0;
@@ -1147,7 +1147,7 @@ static int sid_status_control_put(struct snd_kcontrol *kcontrol,


	dev_dbg(codec->dev, "%s: Enter\n", __func__);
	dev_dbg(codec->dev, "%s: Enter\n", __func__);


	if (ucontrol->value.integer.value[0] != SID_APPLY_FIR) {
	if (ucontrol->value.enumerated.item[0] != SID_APPLY_FIR) {
		dev_err(codec->dev,
		dev_err(codec->dev,
			"%s: ERROR: This control supports '%s' only!\n",
			"%s: ERROR: This control supports '%s' only!\n",
			__func__, enum_sid_state[SID_APPLY_FIR]);
			__func__, enum_sid_state[SID_APPLY_FIR]);
@@ -1199,7 +1199,7 @@ static int anc_status_control_get(struct snd_kcontrol *kcontrol,
	struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev);
	struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev);


	mutex_lock(&drvdata->ctrl_lock);
	mutex_lock(&drvdata->ctrl_lock);
	ucontrol->value.integer.value[0] = drvdata->anc_status;
	ucontrol->value.enumerated.item[0] = drvdata->anc_status;
	mutex_unlock(&drvdata->ctrl_lock);
	mutex_unlock(&drvdata->ctrl_lock);


	return 0;
	return 0;
@@ -1220,7 +1220,7 @@ static int anc_status_control_put(struct snd_kcontrol *kcontrol,


	mutex_lock(&drvdata->ctrl_lock);
	mutex_lock(&drvdata->ctrl_lock);


	req = ucontrol->value.integer.value[0];
	req = ucontrol->value.enumerated.item[0];
	if (req >= ARRAY_SIZE(enum_anc_state)) {
	if (req >= ARRAY_SIZE(enum_anc_state)) {
		status = -EINVAL;
		status = -EINVAL;
		goto cleanup;
		goto cleanup;
+3 −3
Original line number Original line Diff line number Diff line
@@ -103,9 +103,9 @@ bool adau17x1_has_dsp(struct adau *adau);
#define ADAU17X1_CLOCK_CONTROL_CORECLK_SRC_PLL	BIT(3)
#define ADAU17X1_CLOCK_CONTROL_CORECLK_SRC_PLL	BIT(3)
#define ADAU17X1_CLOCK_CONTROL_SYSCLK_EN	BIT(0)
#define ADAU17X1_CLOCK_CONTROL_SYSCLK_EN	BIT(0)


#define ADAU17X1_SERIAL_PORT1_BCLK32		(0x0 << 5)
#define ADAU17X1_SERIAL_PORT1_BCLK64		(0x0 << 5)
#define ADAU17X1_SERIAL_PORT1_BCLK48		(0x1 << 5)
#define ADAU17X1_SERIAL_PORT1_BCLK32		(0x1 << 5)
#define ADAU17X1_SERIAL_PORT1_BCLK64		(0x2 << 5)
#define ADAU17X1_SERIAL_PORT1_BCLK48		(0x2 << 5)
#define ADAU17X1_SERIAL_PORT1_BCLK128		(0x3 << 5)
#define ADAU17X1_SERIAL_PORT1_BCLK128		(0x3 << 5)
#define ADAU17X1_SERIAL_PORT1_BCLK256		(0x4 << 5)
#define ADAU17X1_SERIAL_PORT1_BCLK256		(0x4 << 5)
#define ADAU17X1_SERIAL_PORT1_BCLK_MASK		(0x7 << 5)
#define ADAU17X1_SERIAL_PORT1_BCLK_MASK		(0x7 << 5)
+4 −4
Original line number Original line Diff line number Diff line
@@ -60,15 +60,15 @@ static int cs42l51_get_chan_mix(struct snd_kcontrol *kcontrol,
	switch (value) {
	switch (value) {
	default:
	default:
	case 0:
	case 0:
		ucontrol->value.integer.value[0] = 0;
		ucontrol->value.enumerated.item[0] = 0;
		break;
		break;
	/* same value : (L+R)/2 and (R+L)/2 */
	/* same value : (L+R)/2 and (R+L)/2 */
	case 1:
	case 1:
	case 2:
	case 2:
		ucontrol->value.integer.value[0] = 1;
		ucontrol->value.enumerated.item[0] = 1;
		break;
		break;
	case 3:
	case 3:
		ucontrol->value.integer.value[0] = 2;
		ucontrol->value.enumerated.item[0] = 2;
		break;
		break;
	}
	}


@@ -85,7 +85,7 @@ static int cs42l51_set_chan_mix(struct snd_kcontrol *kcontrol,
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	unsigned char val;
	unsigned char val;


	switch (ucontrol->value.integer.value[0]) {
	switch (ucontrol->value.enumerated.item[0]) {
	default:
	default:
	case 0:
	case 0:
		val = CHAN_MIX_NORMAL;
		val = CHAN_MIX_NORMAL;
+4 −4
Original line number Original line Diff line number Diff line
@@ -334,7 +334,7 @@ static int da732x_hpf_set(struct snd_kcontrol *kcontrol,
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
	struct soc_enum *enum_ctrl = (struct soc_enum *)kcontrol->private_value;
	struct soc_enum *enum_ctrl = (struct soc_enum *)kcontrol->private_value;
	unsigned int reg = enum_ctrl->reg;
	unsigned int reg = enum_ctrl->reg;
	unsigned int sel = ucontrol->value.integer.value[0];
	unsigned int sel = ucontrol->value.enumerated.item[0];
	unsigned int bits;
	unsigned int bits;


	switch (sel) {
	switch (sel) {
@@ -368,13 +368,13 @@ static int da732x_hpf_get(struct snd_kcontrol *kcontrol,


	switch (val) {
	switch (val) {
	case DA732X_HPF_VOICE_EN:
	case DA732X_HPF_VOICE_EN:
		ucontrol->value.integer.value[0] = DA732X_HPF_VOICE;
		ucontrol->value.enumerated.item[0] = DA732X_HPF_VOICE;
		break;
		break;
	case DA732X_HPF_MUSIC_EN:
	case DA732X_HPF_MUSIC_EN:
		ucontrol->value.integer.value[0] = DA732X_HPF_MUSIC;
		ucontrol->value.enumerated.item[0] = DA732X_HPF_MUSIC;
		break;
		break;
	default:
	default:
		ucontrol->value.integer.value[0] = DA732X_HPF_DISABLED;
		ucontrol->value.enumerated.item[0] = DA732X_HPF_DISABLED;
		break;
		break;
	}
	}


Loading