Commit graph

24131 commits

Author SHA1 Message Date
Takashi Iwai ad09ef2cce 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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJW3OpsAAoJECTWi3JdVIfQ/lMH/05/atIZLFI3tfxpp9P1zCD2
 6BH6aUtGEz8uh7wpfLlgUKvBhFZxZmr2aYHiuD2c2UQYWJ5L14GavkUvrohQ1oBp
 6LGN2pJ/0uhQ6XnFHcYnJt5C3pdQspNxaNZBCTdLQZDjjki13Q8jXVL2vToFFbpK
 vFEHLqeuwtSLgtgNJMHHLR6o5QpfX7lcMGKwsfNI8k5b+2j5UDh+fwGQcnU9wueU
 FyxIy9FNlHd1nWwQDNyGL06pMKazsPV6KaPDXa/rG6RsOBxpjz+5JgCVKmAh7EUp
 /qUS2Xy0DVTkedtunnA9EIIHyfC1zuFjeH6lU2UyP/A2kcMlzpNyt7uMRK0dolg=
 =+Y7p
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-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.
2016-03-07 11:06:46 +01:00
Mark Brown 02db17ff37 Merge remote-tracking branches 'asoc/fix/wm8985', 'asoc/fix/wm8994', 'asoc/fix/wm8996', 'asoc/fix/wm9081' and 'asoc/fix/wm9713' into asoc-linus 2016-03-05 21:27:13 +09:00
Mark Brown b23229e4d5 Merge remote-tracking branches 'asoc/fix/samsung', 'asoc/fix/tlv320dac33', 'asoc/fix/wl1273', 'asoc/fix/wm8753', 'asoc/fix/wm8904', 'asoc/fix/wm8958' and 'asoc/fix/wm8983' into asoc-linus 2016-03-05 21:26:58 +09:00
Mark Brown 3b22371e20 Merge remote-tracking branches 'asoc/fix/jack', 'asoc/fix/max98088', 'asoc/fix/max98095', 'asoc/fix/omap', 'asoc/fix/pxa' and 'asoc/fix/qcom-be' into asoc-linus 2016-03-05 21:26:45 +09:00
Mark Brown 92e9f77306 Merge remote-tracking branches 'asoc/fix/ab8500', 'asoc/fix/adau17x1', 'asoc/fix/adsp', 'asoc/fix/cs42l51', 'asoc/fix/da732x' and 'asoc/fix/fsl-ssi' into asoc-linus 2016-03-05 21:26:33 +09:00
Mark Brown 6374fda147 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2016-03-05 21:26:30 +09:00
Mark Brown 1c750eb580 Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2016-03-05 21:26:28 +09:00
Libin Yang 790b415c98 ALSA: hda - hdmi defer to register acomp eld notifier
Defer to register acomp eld notifier until hdmi audio driver
is fully ready.

After registering eld notifier, gfx driver can use this
callback function to notify audio driver the monitor
connection event. However this action may happen when
audio driver is adding the pins or doing other initialization.
This is not always safe, however. For example, using
per_pin->lock before the lock is initialized.

Let's register the eld notifier after the initialization is done.

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-04 08:40:24 +01:00
Libin Yang ec75a940b1 ALSA: hda - hdmi add wmb barrier for audio component
To make sure audio_ptr is set before intel_audio_codec_enable()
or intel_audio_codec_disable() calling pin_eld_notify(),
this patch adds wmb barrier to prevent optimizing.

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-04 08:37:59 +01:00
Simon South 02322ac9de ALSA: hda - Fix mic issues on Acer Aspire E1-472
This patch applies the microphone-related fix created for the Acer
Aspire E1-572 to the E1-472 as well, as it uses the same Realtek ALC282
CODEC and demonstrates the same issues.

This patch allows an external, headset microphone to be used and limits
the gain on the (quite noisy) internal microphone.

Signed-off-by: Simon South <simon@simonsouth.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-03 10:27:54 +01:00
Takashi Iwai 197b958c1e ALSA: seq: oss: Don't drain at closing a client
The OSS sequencer client tries to drain the pending events at
releasing.  Unfortunately, as spotted by syzkaller fuzzer, this may
lead to an unkillable process state when the event has been queued at
the far future.  Since the process being released can't be signaled
any longer, it remains and waits for the echo-back event in that far
future.

Back to history, the draining feature was implemented at the time we
misinterpreted POSIX definition for blocking file operation.
Actually, such a behavior is superfluous at release, and we should
just release the device as is instead of keeping it up forever.

This patch just removes the draining call that may block the release
for too long time unexpectedly.

BugLink: http://lkml.kernel.org/r/CACT4Y+Y4kD-aBGj37rf-xBw9bH3GMU6P+MYg4W1e-s-paVD2pg@mail.gmail.com
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-01 20:26:40 +01:00
Dennis Kadioglu 17e2df4613 ALSA: usb-audio: Add a quirk for Plantronics DA45
Plantronics DA45 does not support reading the sample rate which leads
to many lines of "cannot get freq at ep 0x4" and "cannot get freq at
ep 0x84". This patch adds the USB ID of the DA45 to quirks.c and
avoids those error messages.

Signed-off-by: Dennis Kadioglu <denk@post.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-03-01 14:40:52 +01:00
Takashi Iwai 15c665700b ASoC: wm_adsp: Fix enum ctl accesses in a wrong type
The firmware ctls like "DSP1 Firmware" in wm_adsp codec driver are
enum, while the current driver accesses wrongly via
value.integer.value[].  They have to be via value.enumerated.item[]
instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2016-03-01 12:13:12 +09:00
Takashi Iwai 39a79fe104 ASoC: wm9081: Fix enum ctl accesses in a wrong type
"Speaker Mode "ctl in wm9081 codec driver is enum, while the current
driver accesses wrongly via value.integer.value[].  They have to be
via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:12:37 +09:00
Takashi Iwai 8293004c81 ASoC: wm8996: Fix enum ctl accesses in a wrong type
"DSP1 EQ Mode" and "DSP2 EQ Mode" ctls in wm8996 codec driver are
enum, while the current driver accesses wrongly via
value.integer.value[].  They have to be via value.enumerated.item[]
instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:12:05 +09:00
Takashi Iwai 8019c0b37c ASoC: wm8994: Fix enum ctl accesses in a wrong type
The DRC Mode like "AIF1DRC1 Mode" and EQ Mode like "AIF1.1 EQ Mode" in
wm8994 codec driver are enum ctls, while the current driver accesses
wrongly via value.integer.value[].  They have to be via
value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2016-03-01 12:11:42 +09:00
Takashi Iwai 251d604778 ASoC: wm8985: Fix enum ctl accesses in a wrong type
"Equalizer Function" ctl in wm8985 codec driver is enum, while the
current driver accesses wrongly via value.integer.value[].  They have
to be via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:11:22 +09:00
Takashi Iwai b5ab265905 ASoC: wm8983: Fix enum ctl accesses in a wrong type
"Equalizer Function" ctl in wm8983 codec driver is enum, while the
current driver accesses wrongly via value.integer.value[].  They have
to be via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:11:10 +09:00
Takashi Iwai d0784829ae ASoC: wm8958: Fix enum ctl accesses in a wrong type
"MBC Mode", "VSS Mode", "VSS HPF Mode" and "Enhanced EQ Mode" ctls in
wm8958 codec driver are enum, while the current driver accesses
wrongly via value.integer.value[].  They have to be via
value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2016-03-01 12:10:42 +09:00
Takashi Iwai c41a024c4e ASoC: wm8904: Fix enum ctl accesses in a wrong type
"DRC Mode" and "EQ Mode" ctls in wm8904 codec driver are enum, while
the current driver accesses wrongly via value.integer.value[].  They
have to be via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:10:08 +09:00
Takashi Iwai 0cad10539b ASoC: wm8753: Fix enum ctl accesses in a wrong type
"DAI Mode" ctl in wm8753 codec driver is enum, while the current
driver accesses wrongly via value.integer.value[].  They have to be
via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:09:46 +09:00
Takashi Iwai 154a0fddd4 ASoC: wl1273: Fix enum ctl accesses in a wrong type
"Codec Mode" and "Audio Switch" ctls in wl1273 codec driver are enum,
while the current driver accesses wrongly via value.integer.value[].
They have to be via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:09:30 +09:00
Takashi Iwai 8733f99c23 ASoC: tlv320dac33: Fix enum ctl accesses in a wrong type
"FIFO Mode" ctl in tlv320dac33 codec driver is enum, while the current
driver accesses wrongly via value.integer.value[].  They have to be
via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:09:06 +09:00
Takashi Iwai 58c0213872 ASoC: max98095: Fix enum ctl accesses in a wrong type
"Biquad1 Mode" and "Biquad2 Mode" ctls in max98095 codec driver are
enum, while the current driver accesses wrongly via
value.integer.value[].  They have to be via value.enumerated.item[]
instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:06:51 +09:00
Takashi Iwai 9af3904475 ASoC: max98088: Fix enum ctl accesses in a wrong type
"EQ1 Mode" and "EQ2 Mode" ctls in max98088 codec driver are enum,
while the current driver accesses wrongly via value.integer.value[].
They have to be via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:05:53 +09:00
Takashi Iwai 4b60631612 ASoC: ab8500: Fix enum ctl accesses in a wrong type
"Sidetone Status" and "ANC Status" ctls in ab8500 codec driver are
enum, while the current driver accesses wrongly via
value.integer.value[].  They have to be via value.enumerated.item[]
instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:05:35 +09:00
Takashi Iwai fe9aba1310 ASoC: da732x: Fix enum ctl accesses in a wrong type
"DAC1 High Pass Filter Mode" & co in da732x codec driver are enum,
while the current driver accesses wrongly via value.integer.value[].
They have to be via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:04:04 +09:00
Takashi Iwai 89300b4e5a ASoC: cs42l51: Fix enum ctl accesses in a wrong type
"PCM channel mixer" ctl in cs42l51 codec driver is enum, while the
current driver accesses wrongly via value.integer.value[].  They have
to be via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:03:45 +09:00
Takashi Iwai 508ddfba37 ASoC: intel: mfld: Fix enum ctl accesses in a wrong type
"Playback Switch" and "Lineout Mux" ctls in medfld machine driver are
enum, while the current driver accesses wrongly via
value.integer.value[].  They have to be via value.enumerated.item[]
instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:03:12 +09:00
Takashi Iwai f4d438eec7 ASoC: omap: rx51: Fix enum ctl accesses in a wrong type
"Speaker Function", "Input Select" and "Jack Function" ctls in rx51
driver are enum, while the current driver accesses wrongly via
value.integer.value[].  They have to be via value.enumerated.item[]
instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:02:56 +09:00
Takashi Iwai dd90533cd6 ASoC: omap: n810: Fix enum ctl accesses in a wrong type
"Jack Function", "Speaker Function" and "Input Select" ctls in n810
driver are enum, while the current driver accesses wrongly via
value.integer.value[].  They have to be via value.enumerated.item[]
instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:02:47 +09:00
Takashi Iwai 419396d5a1 ASoC: pxa: tosa: Fix enum ctl accesses in a wrong type
"Jack Function" and "Speaker Function" ctls in tosa are enum, while
the current driver accesses wrongly via value.integer.value[].  They
have to be via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:02:05 +09:00
Takashi Iwai 49a1ba16ab ASoC: pxa: spitz: Fix enum ctl accesses in a wrong type
"Jack Function" and "Speaker Function" ctls in spitz are enum, while
the current driver accesses wrongly via value.integer.value[].  They
have to be via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:02:05 +09:00
Takashi Iwai 7a3f4b488c ASoC: pxa: poodle: Fix enum ctl accesses in a wrong type
"Jack Function" and "Speaker Function" ctls in poodle are enum, while
the current driver accesses wrongly via value.integer.value[].  They
have to be via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:02:05 +09:00
Takashi Iwai 127ee199d5 ASoC: pxa: magician: Fix enum ctl accesses in a wrong type
"Input Select" ctl in magician driver is an enum, while the current
driver accesses wrongly via value.integer.value[].  They have to be
via value.enumerated.item[] instead.

(Meanwhile "Headphone Switch" and "Speaker Switch" are boolean, so
 they should stay to access via value.integer.value[] as is.)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:02:05 +09:00
Takashi Iwai 1457ad0e99 ASoC: pxa: corgi: Fix enum ctl accesses in a wrong type
"Jack Function" and "Speaker Function" ctls in corgi are enum, while
the current driver accesses wrongly via value.integer.value[].  They
have to be via value.enumerated.item[] instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 12:02:05 +09:00
Takashi Iwai 741338f99f ASoC: dapm: Fix ctl value accesses in a wrong type
snd_soc_dapm_dai_link_get() and _put() access the associated ctl
values as value.integer.value[].  However, this is an enum ctl, and it
has to be accessed via value.enumerated.item[].  The former is long
while the latter is unsigned int, so they don't align.

Fixes: c66150824b ('ASoC: dapm: add code to configure dai link parameters')
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-01 11:59:41 +09:00
Takashi Iwai eab3c4db19 ALSA: hdsp: Fix wrong boolean ctl value accesses
snd-hdsp driver accesses enum item values (int) instead of boolean
values (long) wrongly for some ctl elements.  This patch fixes them.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-29 18:13:34 +01:00
Takashi Iwai c1099c3294 ALSA: hdspm: Fix zero-division
HDSPM driver contains a code issuing zero-division potentially in
system sample rate ctl code.  This patch fixes it by not processing
a zero or invalid rate value as a divisor, as well as excluding the
invalid value to be passed via the given ctl element.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-29 18:13:34 +01:00
Takashi Iwai 537e481362 ALSA: hdspm: Fix wrong boolean ctl value accesses
snd-hdspm driver accesses enum item values (int) instead of boolean
values (long) wrongly for some ctl elements.  This patch fixes them.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-29 18:13:34 +01:00
Takashi Iwai b24e7ad1fd ALSA: timer: Fix ioctls for X32 ABI
X32 ABI takes the 64bit timespec, thus the timer user status ioctl becomes
incompatible with IA32.  This results in NOTTY error when the ioctl is
issued.

Meanwhile, this struct in X32 is essentially identical with the one in
X86-64, so we can just bypassing to the existing code for this
specific compat ioctl.

Cc: <stable@vger.kernel.org> # v3.4+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-28 17:49:30 +01:00
Takashi Iwai 3a72494ac2 ALSA: timer: Fix broken compat timer user status ioctl
The timer user status compat ioctl returned the bogus struct used for
64bit architectures instead of the 32bit one.  This patch addresses
it to return the proper struct.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-28 17:48:11 +01:00
Takashi Iwai 2251fbbc15 ALSA: rawmidi: Fix ioctls X32 ABI
Like the previous fixes for ctl and PCM, we need a fix for
incompatible X32 ABI regarding the rawmidi: namely, struct
snd_rawmidi_status has the timespec, and the size and the alignment on
X32 differ from IA32.

This patch fixes the incompatible ioctl for X32.

Cc: <stable@vger.kernel.org> # v3.4+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-28 17:44:51 +01:00
Takashi Iwai dd7e3f8052 ALSA: rawmidi: Use comapt_put_timespec()
Instead of open-coding, use the existing helper to copy a 32bit
timespec from/to 64bit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-28 17:44:48 +01:00
Takashi Iwai 513ace79b6 ALSA: pcm: Fix ioctls for X32 ABI
X32 ABI uses the 64bit timespec in addition to 64bit alignment of
64bit values.  This leads to incompatibilities in some PCM ioctls
involved with snd_pcm_channel_info, snd_pcm_status and
snd_pcm_sync_ptr structs.  Fix the PCM compat ABI for these ioctls
like the previous commit for ctl API.

Reported-by: Steven Newbury <steve@snewbury.org.uk>
Cc: <stable@vger.kernel.org> # v3.4+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-28 17:44:35 +01:00
Takashi Iwai 6236d8bb2a ALSA: ctl: Fix ioctls for X32 ABI
The X32 ABI takes the same alignment like x86-64, and this may result
in the incompatible struct size from ia32.  Unfortunately, we hit this
in some control ABI: struct snd_ctl_elem_value differs between them
due to the position of 64bit variable array.  This ends up with the
unknown ioctl (ENOTTY) error.

The fix is to add the compat entries for the new aligned struct.

Reported-and-tested-by: Steven Newbury <steve@snewbury.org.uk>
Cc: <stable@vger.kernel.org> # v3.4+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-28 17:43:54 +01:00
Takashi Iwai 473f414564 ALSA: hda - Loop interrupt handling until really cleared
Currently the interrupt handler of HD-audio driver assumes that no irq
update is needed while processing the irq.  But in reality, it has
been confirmed that the HW irq is issued even during the irq
handling.  Since we clear the irq status at the beginning, process the
interrupt, then exits from the handler, the lately issued interrupt is
left untouched without being properly processed.

This patch changes the interrupt handler code to loop over the
check-and-process.  The handler tries repeatedly as long as the IRQ
status are turned on, and either stream or CORB/RIRB is handled.

For checking the stream handling, snd_hdac_bus_handle_stream_irq()
returns a value indicating the stream indices bits.  Other than that,
the change is only in the irq handler itself.

Reported-by: Libin Yang <libin.yang@linux.intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-26 08:50:31 +01:00
Carlo Caione c8560b7c91 ASoC: cht_bsw_rt5645: Fix writing to string literal
We cannot use strcpy() to write to a const char * location. This is
causing a 'BUG: unable to handle kernel paging request' error at boot
when using the cht-bsw-rt5645 driver.

With this patch we also fix a wrong indexing in the driver where the
codec_name of the wrong dai_link is being overwritten.

Signed-off-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-02-26 11:11:47 +09:00
Takashi Iwai f883982dc1 ALSA: hda - Fix headset support and noise on HP EliteBook 755 G2
HP EliteBook 755 G2 with ALC3228 (ALC280) codec [103c:221c] requires
the known fixup (ALC269_FIXUP_HEADSET_MIC) for making the headset mic
working.  Also, it suffers from the loopback noise problem, so we
should disable aamix path as well.

Reported-by: Derick Eddington <derick.eddington@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-25 14:36:08 +01:00
David Henningsson 2ae955774f ALSA: hda - Fixup speaker pass-through control for nid 0x14 on ALC225
On one of the machines we enable, we found that the actual speaker volume
did not always correspond to the volume set in alsamixer. This patch
fixes that problem.

This patch was orginally written by Kailang @ Realtek, I've rebased it
to fit sound git master.

Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/bugs/1549660
Co-Authored-By: Kailang <kailang@realtek.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-25 10:24:29 +01:00