Commit graph

7077 commits

Author SHA1 Message Date
Takashi Iwai
1d260d7b3b ALSA: hda/proc - Fix racy string access for power states
The power states in a proc file are printed in a racy manner on a
single static string buffer.  Fix it by calling snd_iprintf() directly
for each state instead of processing on a temporary buffer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-17 15:12:04 +02:00
Takashi Iwai
cc75cdfe1d ALSA: hda/proc - Add const to possible places
Many arrays in hda_proc.c are string arrays that should be covered by
const prefix for increasing the safety and reducing the size.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-17 15:11:31 +02:00
Takashi Iwai
d2c6b63df5 ALSA: hda - Make some helper functions local
A few helper functions to convert the pin information to strings have
been exported with assumption that they were used by other drivers.
But they are referred only in the proc interface in the end.

Let's make them local so that we can get rid of a few exports.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-17 15:10:15 +02:00
Takashi Iwai
41450b1b5b Merge branch 'for-linus' into for-next 2015-08-11 09:40:16 +02:00
Takashi Iwai
fe14f39e88 ALSA: hda - Fix pin config and mapping on Alienware 15
Alienware 15 has CA0132 codec for its onboard sound, but the pin
config and mapping seem quite different from other Creative boards.
This patch corrects them, at least, for providing the right headphone
and mic jack notification, as well as removing the non-existing SPDIF
pins.

Even with this fix, not all stuff works perfectly yet, mainly because
of the badly written ca0132 driver code -- it has too many implicit
assumptions of pin configs and maps.  Nevertheless, this is a small
good step forward.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=101981
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-10 16:53:32 +02:00
Mark Brown
3f6175ece9 ALSA: echoaudio: Use standard C definitions of true and false
The echoaudio locally defines TRUE and FALSE.  Not only is this
redundant given that C now has a boolean type it results in lots of
warnings as other headers also define these macros, causing duplicate
definitions.  Fix this by removing the local defines and converting all
local users to use the standard C true and false instead, simply
removing the macros is less safe due to implicit inclusion of the other
definitons.

[fixed overlooked replacement of FALSE by tiwai]

Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-10 14:27:16 +02:00
Takashi Iwai
9f502ff553 ALSA: hda - yet another fix for Dell headset mic with ALC3266
It turned out that there are three variants of pin config values of
NID 0x17 on Dell laptops with ALC3266 (alias of ALC298): 0x90170110,
0x90170140 and 0x90170150.  The first two have been already covered by
commits 703867e2f2 and 977e627684, so this commit adds the missing
last entry.

While we're at it, rearrange the three entries in the order of pincfg
values.

Reported-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 12:09:45 +02:00
Hui Wang
73851b36fe ALSA: hda - one Dell machine needs the headphone white noise fixup
The fixup ALC292_FIXUP_DISABLE_AAMIX can fix the white noise of
the headphone on this Dell machine.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 12:08:16 +02:00
Woodrow Shen
703867e2f2 ALSA: hda - Fix Dell laptop for internal mic/headset mic
The new Dell laptop with ALC3266 can't use internal microphone to
record. Also, the 3 ring headset mic doesn't work on it. For src of
patch_realtek.c, only the pin cfg of Nid 0x17 is different, so the
Nid 0x17 is added into pin quirk, and others are defined to macro
ALC298_STANDARD_PINS in common use.

Codec: Realtek ALC3266
Vendor Id: 0x10ec0298
Subsystem Id: 0x102806e5

BugLink: https://bugs.launchpad.net/bugs/1481575
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-05 07:47:42 +02:00
Hui Wang
1158029733 ALSA: hda - remove no physical connection pins from pin_quirk table
To cleanup the pin_quirk table:
 - rewrite the pin_config_match(), comparing all pins on the machine
   with the corresponding pins in the quirk table.
 - remove all 0x4xxxxxxx pin configurations from pin_quirk table
 - after removing the 0x4xxxxxxx pin configurations, some pin tables
   are exactly same, so removing the redudant pin tables.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-03 10:16:20 +02:00
Tomer Barletz
8ec7cfce37 ALSA: oxygen: Fix logical-not-parentheses warning
This fixes the following warning, that is seen with gcc 5.1:
warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses].

Signed-off-by: Tomer Barletz <barletz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-03 10:15:09 +02:00
Takashi Iwai
649ccd0853 ALSA: hda - Fix MacBook Pro 5,2 quirk
MacBook Pro 5,2 with ALC889 codec had already a fixup entry, but this
seems not working correctly, a fix for pin NID 0x15 is needed in
addition.  It's equivalent with the fixup for MacBook Air 1,1, so use
this instead.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102131
Reported-and-tested-by: Jeffery Miller <jefferym@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-30 22:30:29 +02:00
U. Artie Eoff
342e844905 ALSA: hda - Fix race between PM ops and HDA init/probe
PM ops could be triggered before HDA is done initializing
and cause PM to set HDA controller to D3Hot.  This can result
in "CORB reset timeout#2, CORBRP = 65535" and "no codecs
initialized".  Additionally, PM ops can be triggered before
azx_probe_continue finishes (async probe).  This can result
in a NULL deref kernel crash.

To fix this, avoid PM ops if !chip->running.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-29 19:37:26 +02:00
Takashi Iwai
3a05d12f46 ALSA: hda - Apply a fixup to Dell Vostro 5480
Dell Vostro 5480 (1028:069a) needs the very same quirk used for Vostro
5470 model to make bass speakers properly working.

Reported-and-tested-by: Paulo Roberto de Oliveira Castro <p.oliveira.castro@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-29 09:04:52 +02:00
Takashi Iwai
527c465a3c Merge branch 'for-linus' into for-next
... to make easier developing HDA ext code.
2015-07-27 14:43:29 +02:00
Woodrow Shen
5ce000b297 ALSA: hda - Add pin quirk for the headset mic jack detection on Dell laptop
The new Dell laptop with codec 256 can't detect headset mic when
headset was inserted on the machine. From alsa-info, we check
init_pin_configs and need to define the new register value for pin
0x1d & 0x1e because the original macro ALC256_STANDARD_PINS can't
match pin definition. Also, the macro ALC256_STANDARD_PINS is
simplified by removing them. This makes headset mic works on laptop.

Codec: Realtek ALC256
Vendor Id: 0x10ec0256
Subsystem Id: 0x102806f2

BugLink: https://bugs.launchpad.net/bugs/1478497
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-27 12:48:40 +02:00
Takashi Iwai
b9d9c9efc2 ALSA: hda - Apply fixup for another Toshiba Satellite S50D
Toshiba Satellite S50D has another model with a different PCI SSID
(1179:fa93) while the previous fixup was for 1179:fa91.  Adjust the
fixup entry with SND_PCI_QUIRK_MASK() to match with both devices.

Reported-by: Tim Sample <timsample@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-27 10:18:21 +02:00
Woodrow Shen
e9c28e16a0 ALSA: hda - Fix the headset mic that will not work on Dell desktop machine
When the headset was plugged in the Dell desktop, the mic of headset
can't be detected and workable.
According to the alsa-info, we found the differece between alsa and
init_pin_configs on the machine, so we need to add the pin configs to
make headset work.

Codec: Realtek ALC3234
Vendor Id: 0x10ec0255
Subsystem Id: 0x102806bb

BugLink: https://bugs.launchpad.net/bugs/1477900
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-25 08:19:41 +02:00
Dan Carpenter
44008f0896 ALSA: hda - fix cs4210_spdif_automute()
Smatch complains that we have nested checks for "spdif_present".  It
turns out the current behavior isn't correct, we should remove the first
check and keep the second.

Fixes: 1077a02481 ('ALSA: hda - Use generic parser for Cirrus codec driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-25 08:19:04 +02:00
Takashi Iwai
43cbf02e7a ASoC: Fixes for v4.2
A lot of small fixes here, a few to the core:
 
  - Fix for binding DAPM stream widgets on devices with prefixes assigned
    to them
  - Minor fixes for the newly added topology interfaces
  - Locking and memory leak fixes for DAPM
  - Driver specific fixes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVsnNFAAoJECTWi3JdVIfQH9cH/1ddueDFikvXSCyntuJcHAwJ
 a7X5kCVdegMnaMK5fnAbTlJBpDIX/F1UBvsFQQ38eKWeneP44XnkXeh/32fGJzQO
 L730dqy0tkgQdWJkQg0yxaP5/k0BfhnXeRc3ATUG3LBgUBrWRYLTIvaM+G+H3Kf5
 K88QL7cKmeY0Kt6+cms3nnBj9x5oFgbHIW7Y3K/pza+XPVecZ7N3/5gpV+VQDUXh
 Oz3cZOsC5h4+IpxkOrLXY7zgLvrt/HfRTO2QF/3Ntub81anAk190pVAquM+r/CTn
 tQ3sPNGLglQ4VRXNP6yBKJOp5CUTBLt5XWlJ+Kg9p2OiiuOPla4wkhuGDS5AM64=
 =nJJl
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v4.2

A lot of small fixes here, a few to the core:

 - Fix for binding DAPM stream widgets on devices with prefixes assigned
   to them
 - Minor fixes for the newly added topology interfaces
 - Locking and memory leak fixes for DAPM
 - Driver specific fixes
2015-07-24 20:08:13 +02:00
David Henningsson
cba59972a1 ALSA: hda - Add headset mic pin quirk for a Dell device
Without this patch, the headset mic will not work on this machine.

BugLink: https://bugs.launchpad.net/bugs/1476987
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-22 10:33:32 +02:00
Hui Wang
21e9d017b8 ALSA: hda - remove one pin from ALC292_STANDARD_PINS
One more Dell laptop with alc293 codec needs
ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, but the pin 0x1e does not match
the corresponding one in the ALC292_STANDARD_PINS. To use this macro
for this machine, we need to remove pin 0x1e from it.

BugLink: https://bugs.launchpad.net/bugs/1476888
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-22 10:33:00 +02:00
Aaron Plattner
6c3d91193d ALSA: hda - Add new GPU codec ID 0x10de007d to snd-hda
Vendor ID 0x10de007d is used by a yet-to-be-named GPU chip.

This chip also has the 2-ch audio swapping bug, so patch_nvhdmi is
appropriate here.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-21 09:37:01 +02:00
Maruthi Srinivas Bayyavarapu
5022813ddb ALSA: hda: add new AMD PCI IDs with proper driver caps
Fixes audio problems on newer asics

Signed-off-by: Maruthi Bayyavarapu <maruthi.bayyavarapu@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-20 15:29:36 +02:00
David Henningsson
033ea349a7 ALSA: hda - Fix Skylake codec timeout
When the controller is powered up but the HDMI codec is powered down
on Skylake, the power well is turned off. When the codec is then
powered up again, we need to poke the codec a little extra to make
sure it wakes up. Otherwise we'll get sad "no response from codec"
messages and broken audio.

This also changes azx_runtime_resume to actually call
snd_hdac_set_codec_wakeup for Skylake (before STATETS read).
(Otherwise it would only have been called for Haswell and Broadwell,
which both do not need it, so this probably was not the author's
intention.)

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Reviewed-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-20 09:33:24 +02:00
Mateusz Sylwestrzak
0420694ddd ALSA: hda - Add headset mic support for Acer Aspire V5-573G
Acer Aspire V5 with the ALC282 codec is given the wrong value for the
0x19 PIN by the laptop's BIOS. Overriding it with the correct value
adds support for the headset microphone which would not otherwise be
visible in the system.

The fix is based on commit 7819717b11 with a similar quirk for Acer
Aspire with the ALC269 codec.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96201
Cc: <stable@vger.kernel.org>
Signed-off-by: Mateusz Sylwestrzak <matisec7@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-19 17:38:56 +02:00
Linus Torvalds
1ea2a01c1d sound fixes for 4.2-rc3
There are two small fixes for HD-audio and USB LINE6, and the rest are
 a few new quirks and device ID addition that are good enough to get
 into 4.2.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJVqNr6AAoJEGwxgFQ9KSmktDUP/0af0005hx/MZ8iWZX3v7Qqj
 zAR5Ils2bbRz+R50WE4X2v6UERoU+DUU5qAh8XOGMAASo4xAUt9Uc/iqDWpPzcv6
 4FJI7lj/8qfsqXT/moO675M1KiPJzPj9CrWQVNZldSCVOC6liGMAcvuLOIxKv8PU
 VBkwsVdZEa5WRwx21DOXeTnqsPWGF/sjz4i1SOFYrHjLPZspNE0lL9rX2xj0jS1Y
 SQgY96zIT58AqVnJNiAmyNVSTQZ915JqgBPrMWJst6xZTKMRSmmFcnLv0ep+SSsn
 DptdMlER8j4bC9YGxj7v1FIEeU6gkyUQ3MZ2c8AVqsrap1zTot2HWBqKQGK+3Rnr
 VkYxTVJ2grEZ53JPw6vI5LydqsW50Iq8lR0dFrLrVTzVzYA02pahp2uovBQ/FJ1P
 Lp03vt3krvSSuOW2a9pK9Y0j5KAJFvxb3YWMONJ922JJPvnur0z6w8kxJ3Y4DwwR
 TD0FeetGptYSh1ZvViBGUv6AfdreQV5J2eqL/bsFMxk2NoXJaiF8tb8cCoQFFl7N
 QZtE1yJKnv8xDjgoxYXhqwDG2+j8okRa3h7ov3MVExjh7KV7wmM+G6H7LiV1SpQ5
 9SIjkgIwoMOSQGt+AubnCZdsMQZWRX8YDQS8048J6X4+SDdNKNwXASNhC5HCtfSS
 kGVXxyJRgEvcoBAnx96n
 =EgRm
 -----END PGP SIGNATURE-----

Merge tag 'sound-4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "There are two small fixes for HD-audio and USB LINE6, and the rest are
  a few new quirks and device ID addition that are good enough to get
  into 4.2"

* tag 'sound-4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek: Enable HP amp and mute LED on HP Folio 9480m [v3]
  ALSA: line6: Fix -EBUSY error during active monitoring
  ALSA: hda - Fix a wrong busy check in alt PCM open
  ALSA: hda - add codec ID for Broxton display audio codec
  ALSA: usb-audio: Add MIDI support for Steinberg MI2/MI4
2015-07-17 10:54:30 -07:00
Heloise NH
6986a0e255 ALSA: hda: fix kstrdup return value
In kstrdup we should return -ENOMEM when it reports an
memory allocation failure, while the -ENODEV is referred
to a failure in finding the cpu node in the device tree.

Signed-off-by: Heloise NH <kernelpatch_update@163.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-17 14:56:19 +02:00
Keith Packard
98973f2f08 ALSA: hda/realtek: Enable HP amp and mute LED on HP Folio 9480m [v3]
This laptop needs GPIO4 pulled high to enable the headphone amplifier,
and has a mute LED on GPIO3. I modelled the patch on the existing
GPIO4 code which pulls the line low for the same purpose; this time,
the HP amp line is pulled high.

v2: Disable the headphone amplifier when no headphone is connected.
    Don't disable power savings to preserve the LED state.

v3: Remove headset-specific hooks and code; this is just a headphone.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-16 12:20:08 +02:00
Maciej S. Szmigiero
2a52feb180 ALSA: emu10k1: rename Audigy Analog Capture Boost control
Audigy has "Analog Capture Boost" mixer control,
however now this only controls mic level, not
other analog sources.

It applies also both to playback and capture,
so rename it to something more descriptive.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-08 09:40:44 +02:00
Maciej S. Szmigiero
5205194294 ALSA: emu10k1: enable TAD mic out on Audigy
Enable TAD output on Audigy naming it "Phone Output",
to be consistent with TAD input which is called "Phone".

According to Creative doc
( http://support.creative.com/kb/ShowArticle.aspx?sid=3026 )
this should output just mic signal.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-08 09:40:36 +02:00
Maciej S. Szmigiero
274b2000a0 ALSA: emu10k1: remove unused AC'97 mixer controls on Audigy
AC'97 Headphone output and EAPD control aren't used
on Audigy so remove them from mixer.

Also remove AC'97 3D control as the driver is
already doing for Audigys with 1361T ADC.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-08 09:40:12 +02:00
Takashi Iwai
d1f15e06b2 ALSA: hda - Fix a wrong busy check in alt PCM open
Currently, the alt PCM open callback returns -EBUSY when an
independent HP is turned off, supposing that it conflicts with the
main PCM.  However, obviously, this check is wrong when the
independent HP itself isn't enabled but the alt PCM was explicitly
created via alc_dac_nid by a codec driver.

Reported-and-tested-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-08 09:27:56 +02:00
Libin Yang
e828b23734 ALSA: hda - add codec ID for Broxton display audio codec
This patch adds codec ID (0x8086280a) and module alias for Broxton
display codec.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-06 10:36:57 +02:00
Linus Torvalds
f822dcc63f sound fixes for 4.2-rc1
Here are a bunch of small fixes, mostly for HD-audio quirks, in
 addition to a few regression fixes and trivial cleanups.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJVkqVMAAoJEGwxgFQ9KSmkZawP/1F+PVygAKNgPM/ju4pEqwkn
 z/6E2RKub1hn2gGQckOXGBqeLKBtNMt82lvU8MQ+Mt7K2iLhD8hcz8/7QfUDA94s
 X+GdfS5qOueoCBRC9DI4icR5OM6BLIw9wSVim3iGpsQCgkUC9imgAD7R/olXunST
 /aOEB3oGdOOun6dSa1Zcl0ILcdYSnTqfB/0YWhRS9MkssDSBlwDEuD5hl61vhLcy
 0E0fBscAm3GDnY4x4oAojUSj9btNZJalQtXaUpGRfH40OsMrVaawgwxGoC26dbZW
 gHpsAJOb7zUMAASD6nH+XwyOKj+p94iZ3e8L8cnb/FcR9XiUwMjkEWhUcc1i7PNU
 u3BoWVXXZzYi632eZhTyMDh8kRcjL3tYpizNeWyJYbe1gRn7IvCa7GivMm2ibHnJ
 k3wPoB0DoJOmHKL+fGxCBXYODwJwpFkDiGT+mGrRkjlHcgt0ojS/PyJkaMMJmBXD
 hOkg4Iryir9MF1yRwZfh3hmzkPWTzgvTdH0GnoWQXwjbZfWkkMl2tKjDfynoRgGH
 mOoJ0SZBU+Pvp7w3SY7+xwNIDseYpdGdHoN6Q+yiirUEqfY4uD9cbnv+5IaDHf70
 uUvHM1RTqAMp9bZfK1dgmvmc3lWg4ZyF+0e/cyh4LH/hN3iGXSSGKElat4fKZrVx
 +C3eEAvoK09WJesdkQNf
 =DOli
 -----END PGP SIGNATURE-----

Merge tag 'sound-fix-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here are a bunch of small fixes, mostly for HD-audio quirks, in
  addition to a few regression fixes and trivial cleanups"

* tag 'sound-fix-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: Fix uninintialized error return
  ALSA: hda: Delete an unnecessary check before the function call "snd_info_free_entry"
  ALSA: hda - Add a fixup for Dell E7450
  ALSA: hda - Fix the dock headphone output on Fujitsu Lifebook E780
  ALSA: hda - Add headset support to Acer Aspire V5
  ALSA: hda - restore the MIC FIXUP for some Dell machines
  ALSA: jack: Fix endless loop at unique index detection
  ALSA: hda - set proper caps for newer AMD hda audio in KB/KV
  ALSA: hda - Disable widget power-save for VIA codecs
  ALSA: hda - Fix Dock Headphone on Thinkpad X250 seen as a Line Out
2015-07-01 14:39:32 -07:00
Linus Torvalds
02201e3f1b Minor merge needed, due to function move.
Main excitement here is Peter Zijlstra's lockless rbtree optimization to
 speed module address lookup.  He found some abusers of the module lock
 doing that too.
 
 A little bit of parameter work here too; including Dan Streetman's breaking
 up the big param mutex so writing a parameter can load another module (yeah,
 really).  Unfortunately that broke the usual suspects, !CONFIG_MODULES and
 !CONFIG_SYSFS, so those fixes were appended too.
 
 Cheers,
 Rusty.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVkgKHAAoJENkgDmzRrbjxQpwQAJVmBN6jF3SnwbQXv9vRixjH
 58V33sb1G1RW+kXxQ3/e8jLX/4VaN479CufruXQp+IJWXsN/CH0lbC3k8m7u50d7
 b1Zeqd/Yrh79rkc11b0X1698uGCSMlzz+V54Z0QOTEEX+nSu2ZZvccFS4UaHkn3z
 rqDo00lb7rxQz8U25qro2OZrG6D3ub2q20TkWUB8EO4AOHkPn8KWP2r429Axrr0K
 wlDWDTTt8/IsvPbuPf3T15RAhq1avkMXWn9nDXDjyWbpLfTn8NFnWmtesgY7Jl4t
 GjbXC5WYekX3w2ZDB9KaT/DAMQ1a7RbMXNSz4RX4VbzDl+yYeSLmIh2G9fZb1PbB
 PsIxrOgy4BquOWsJPm+zeFPSC3q9Cfu219L4AmxSjiZxC3dlosg5rIB892Mjoyv4
 qxmg6oiqtc4Jxv+Gl9lRFVOqyHZrTC5IJ+xgfv1EyP6kKMUKLlDZtxZAuQxpUyxR
 HZLq220RYnYSvkWauikq4M8fqFM8bdt6hLJnv7bVqllseROk9stCvjSiE3A9szH5
 OgtOfYV5GhOeb8pCZqJKlGDw+RoJ21jtNCgOr6DgkNKV9CX/kL/Puwv8gnA0B0eh
 dxCeB7f/gcLl7Cg3Z3gVVcGlgak6JWrLf5ITAJhBZ8Lv+AtL2DKmwEWS/iIMRmek
 tLdh/a9GiCitqS0bT7GE
 =tWPQ
 -----END PGP SIGNATURE-----

Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux

Pull module updates from Rusty Russell:
 "Main excitement here is Peter Zijlstra's lockless rbtree optimization
  to speed module address lookup.  He found some abusers of the module
  lock doing that too.

  A little bit of parameter work here too; including Dan Streetman's
  breaking up the big param mutex so writing a parameter can load
  another module (yeah, really).  Unfortunately that broke the usual
  suspects, !CONFIG_MODULES and !CONFIG_SYSFS, so those fixes were
  appended too"

* tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (26 commits)
  modules: only use mod->param_lock if CONFIG_MODULES
  param: fix module param locks when !CONFIG_SYSFS.
  rcu: merge fix for Convert ACCESS_ONCE() to READ_ONCE() and WRITE_ONCE()
  module: add per-module param_lock
  module: make perm const
  params: suppress unused variable error, warn once just in case code changes.
  modules: clarify CONFIG_MODULE_COMPRESS help, suggest 'N'.
  kernel/module.c: avoid ifdefs for sig_enforce declaration
  kernel/workqueue.c: remove ifdefs over wq_power_efficient
  kernel/params.c: export param_ops_bool_enable_only
  kernel/params.c: generalize bool_enable_only
  kernel/module.c: use generic module param operaters for sig_enforce
  kernel/params: constify struct kernel_param_ops uses
  sysfs: tightened sysfs permission checks
  module: Rework module_addr_{min,max}
  module: Use __module_address() for module_address_lookup()
  module: Make the mod_tree stuff conditional on PERF_EVENTS || TRACING
  module: Optimize __module_address() using a latched RB-tree
  rbtree: Implement generic latch_tree
  seqlock: Introduce raw_read_seqcount_latch()
  ...
2015-07-01 10:49:25 -07:00
Markus Elfring
1947a114bf ALSA: hda: Delete an unnecessary check before the function call "snd_info_free_entry"
The snd_info_free_entry() function tests whether its argument is NULL and
then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-06-29 11:02:36 +02:00
Takashi Iwai
4275554dcc ALSA: hda - Add a fixup for Dell E7450
Dell E7450 [0128:062e] needs the same quirk as other E7xx models.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=100571
Cc: <stable@vger.kernel.org> # v4.1
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-06-29 10:57:39 +02:00
Takashi Iwai
4df3fd1700 ALSA: hda - Fix the dock headphone output on Fujitsu Lifebook E780
Fujitsu Lifebook E780 sets the sequence number 0x0f to only only of
the two headphones, thus the driver tries to assign another as the
line-out, and this results in the inconsistent mapping between the
created jack ctl and the actual I/O.  Due to this, PulseAudio doesn't
handle it properly and gets the silent output.

The fix is to ignore the non-HP sequencer checks.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=99681
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-06-29 08:38:02 +02:00
Takashi Iwai
7819717b11 ALSA: hda - Add headset support to Acer Aspire V5
Acer Aspire V5 with ALC282 codec needs the similar quirk like Dell
laptops to support the headset mic.  The headset mic pin is 0x19 and
it's not exposed by BIOS, thus we need to fix the pincfg as well.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96201
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-06-27 10:23:41 +02:00
Hui Wang
831bfdf952 ALSA: hda - restore the MIC FIXUP for some Dell machines
Those FIXUPs were applied to the machines through pin quirks, but
recently the PCI_QUIRK makes them can't apply to the machines.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=99851
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Cc: <stable@vger.kernel.org> # v4.1
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-06-26 07:05:52 +02:00
Linus Torvalds
4570a37169 sound updates for 4.2-rc1
It was a busy development cycle at this time, as you can see a wide
 range of changes in diffstat.  There are no big changes but many
 refactoring and improvements.  Here we go some highlights:
 
 * ALSA core:
 - Procfs codes were cleaned up to use seq_file
 - Procfs can be opt out via Kconfig (only for EXPERT)
 - Two types of jack API were unified finally; now both kctl and input
   jack devs are handled via a single function call.
 
 * HD-audio
 - Continued code restructuring for the future ASoC driver; now HDA
   controller driver is split to a core helper module.
 - Preliminary codes for Skylake audio support in HDA core.
 - Proper i915 gfx power well management for SKL & co
 - Enabled runtime PM as default for Intel HDMI/DP codecs
 - Newer Tegra chip supports
 - More quirks for Dell headsets, Alienware (with CA0132), etc.
 - A couple of DRM ELD helper API functions
 
 * ASoC
 - Support for loading ASoC topology maps from firmware, intended to be
   used to allow self-describing DSP firmware images to be built which
   can map controls added by the DSP to userspace without the kernel
   needing to know about individual DSP firmwares
 - Lots of refactoring to avoid direct access to snd_soc_codec where
   it's not needed supporting future refactoring
 - Big refactoring, cleanup and enhancement for the Wolfson ADSP driver
 - Cleanup series for TI TAS2552 and R-CAR drivers
 - Fixes and improvements on RT56xx codecs
 - Support for TI TAS571x power amplifiers
 - Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs
 - Support for x86 systems with RT5650 and Qualcomm Storm
 - Support for Mediatek AFE (Audio Front End) unit
 - Other various small fixes to ASoC codec drivers
 
 * Firewire
 - Enhanced to allow non-blocking streams to use timestamp
   synchronization
 - Improve support for DM1500 and BeBoBv3
 
 * Misc
 - Cleanup of old pci API functions over all PCI sound drivers
 - Fix long-standing regression of the old powermac i2c setup
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJVitjmAAoJEGwxgFQ9KSmksW8P/2ngNzNpo/bmmGh6xjB7GWU9
 RDAkqhKd6yvcClQojGS9n4a9CJ8nk5tdqTr9rMp58N7DRv6GYCPdq0A+lLOih+yC
 UPcTkTMBKm6UtvJjEcaasMxhvs5xno345oo5KrBdvlfv1rXe83dTtzEsybWYkaVD
 dJbbr5QFaiyj5cTp9nanK5kyTyDDXCdP+vjBGv5u9+GbVxQ6Eenyts89uSqEZs1F
 ltoBrl4VotXyqHKneJ0ttUKEimcVIgu8rCXH0sTtCg0SZVJFi+UXzI/VkkS+expL
 x9bNN6bw5UT9LA8+qybFRETx+8qchFsffzeUEle4wkIpVKXt/VqjP3GIvp6umlF5
 RhU5Wumf2KuIVjgVsYxd7bUkmHr4ywpqS3vSWMWU90FApJay7exatzLPyUVN0AxH
 pdAizc8NWFk1kVtWq8jr9agEdxDt2l+E9UXij+ViGyouMZL1oSvOo9NgovfwvfC6
 qKUisUkq53p1uPOW/U5gvF7bee2enEXMI9YUY1Z8MHx7nloq+25Nqma8P0gYthB8
 6Qk+t1oqC2p7ZMSkyVHH9nySQmoLITZHZmsHqqpLW+jFtanhuckDI75AvmrScs+r
 3+2YZXxPI0caZZ1qxMCd7Clmh7ZcSeRe73HXSXmF0xrLffISM3Yg3ZN10cbWQRj2
 D6TiHCspLpn+pcYLcWJ2
 =D78E
 -----END PGP SIGNATURE-----

Merge tag 'sound-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "It was a busy development cycle at this time, as you can see a wide
  range of changes in diffstat.  There are no big changes but many
  refactoring and improvements.  Here we go some highlights:

  ALSA core:
   - Procfs codes were cleaned up to use seq_file
   - Procfs can be opt out via Kconfig (only for EXPERT)
   - Two types of jack API were unified finally; now both kctl and input
     jack devs are handled via a single function call.

  HD-audio:
   - Continued code restructuring for the future ASoC driver; now HDA
     controller driver is split to a core helper module.
   - Preliminary codes for Skylake audio support in HDA core.
   - Proper i915 gfx power well management for SKL & co
   - Enabled runtime PM as default for Intel HDMI/DP codecs
   - Newer Tegra chip supports
   - More quirks for Dell headsets, Alienware (with CA0132), etc.
   - A couple of DRM ELD helper API functions

  ASoC:
   - Support for loading ASoC topology maps from firmware, intended to
     be used to allow self-describing DSP firmware images to be built
     which can map controls added by the DSP to userspace without the
     kernel needing to know about individual DSP firmwares
   - Lots of refactoring to avoid direct access to snd_soc_codec where
     it's not needed supporting future refactoring
   - Big refactoring, cleanup and enhancement for the Wolfson ADSP
     driver
   - Cleanup series for TI TAS2552 and R-CAR drivers
   - Fixes and improvements on RT56xx codecs
   - Support for TI TAS571x power amplifiers
   - Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs
   - Support for x86 systems with RT5650 and Qualcomm Storm
   - Support for Mediatek AFE (Audio Front End) unit
   - Other various small fixes to ASoC codec drivers

  Firewire:
   - Enhanced to allow non-blocking streams to use timestamp
     synchronization
   - Improve support for DM1500 and BeBoBv3

  Misc:
   - Cleanup of old pci API functions over all PCI sound drivers
   - Fix long-standing regression of the old powermac i2c setup"

* tag 'sound-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (533 commits)
  ALSA: pcm: Fix pcm_class sysfs output
  ALSA: hda-beep: Update authors dead email address
  ASoC: wm_adsp: Move DSP Rate controls into the codec
  ASoC: wm8995: Fix setting sysclk for WM8995_SYSCLK_MCLK2 case
  ALSA: hda: provide default bus io ops extended hdac
  ALSA: hda: add hda link cleanup routine
  ALSA: hda: add hdac_ext stream creation and cleanup routines
  ASoC: rsrc-card: remove unused ret
  ALSA: HDAC: move SND_HDA_PREALLOC_SIZE to core
  ASoC: mediatek: Add machine driver for rt5650 rt5676 codec
  ASoC: mediatek: Add machine driver for MAX98090 codec
  ASoC: mediatek: Add AFE platform driver
  ASoC: rsnd: remove io from rsnd_mod
  ASoC: rsnd: move rsnd_mod_is_working() to rsnd_io_is_working()
  ASoC: rsnd: don't use rsnd_mod_to_io() on snd_kcontrol
  ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_src_xxx()
  ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_ssi_xxx()
  ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_dma_xxx()
  ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_get_adinr()
  ASoC: rsnd: add common interrupt handler for SSI/SRC/DMA
  ...
2015-06-25 17:15:18 -07:00
Alex Deucher
650474fb73 ALSA: hda - set proper caps for newer AMD hda audio in KB/KV
Fixes audio problems on newer asics.

Noticed by: Kelly Anderson <kelly@xilka.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-06-25 08:58:54 +02:00
Takashi Iwai
735c75cf4d ALSA: hda - Disable widget power-save for VIA codecs
The widget power-save that was enabled in 4.1 kernel seems resulting
in the silent output on VIA codecs by some reason.  Some widgets get
wrong power states.

As a quick fix, turn this flag off while keeping power_down_unused
flag.  This will bring back to the state of 4.0.x.

Fixes: 688b12cc3c ('ALSA: hda - Use the new power control for VIA codecs')
Reported-and-tested-by: Harald Dunkel <harri@afaics.de>
Cc: <stable@vger.kernel.org> # v4.1
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-06-25 08:48:54 +02:00
David Henningsson
ec56af67a1 ALSA: hda - Fix Dock Headphone on Thinkpad X250 seen as a Line Out
Thinkpad X250, when attached to a dock, has two headphone outs but
no line out. Make sure we don't try to turn this into one headphone
and one line out (since that disables the headphone amp on the dock).

Alsa-info at http://www.alsa-project.org/db/?f=36f8764e1d782397928feec715d0ef90dfddd4c1

Cc: stable@vger.kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-06-25 08:47:03 +02:00
Linus Torvalds
d70b3ef54c Merge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 core updates from Ingo Molnar:
 "There were so many changes in the x86/asm, x86/apic and x86/mm topics
  in this cycle that the topical separation of -tip broke down somewhat -
  so the result is a more traditional architecture pull request,
  collected into the 'x86/core' topic.

  The topics were still maintained separately as far as possible, so
  bisectability and conceptual separation should still be pretty good -
  but there were a handful of merge points to avoid excessive
  dependencies (and conflicts) that would have been poorly tested in the
  end.

  The next cycle will hopefully be much more quiet (or at least will
  have fewer dependencies).

  The main changes in this cycle were:

   * x86/apic changes, with related IRQ core changes: (Jiang Liu, Thomas
     Gleixner)

     - This is the second and most intrusive part of changes to the x86
       interrupt handling - full conversion to hierarchical interrupt
       domains:

          [IOAPIC domain]   -----
                                 |
          [MSI domain]      --------[Remapping domain] ----- [ Vector domain ]
                                 |   (optional)          |
          [HPET MSI domain] -----                        |
                                                         |
          [DMAR domain]     -----------------------------
                                                         |
          [Legacy domain]   -----------------------------

       This now reflects the actual hardware and allowed us to distangle
       the domain specific code from the underlying parent domain, which
       can be optional in the case of interrupt remapping.  It's a clear
       separation of functionality and removes quite some duct tape
       constructs which plugged the remap code between ioapic/msi/hpet
       and the vector management.

     - Intel IOMMU IRQ remapping enhancements, to allow direct interrupt
       injection into guests (Feng Wu)

   * x86/asm changes:

     - Tons of cleanups and small speedups, micro-optimizations.  This
       is in preparation to move a good chunk of the low level entry
       code from assembly to C code (Denys Vlasenko, Andy Lutomirski,
       Brian Gerst)

     - Moved all system entry related code to a new home under
       arch/x86/entry/ (Ingo Molnar)

     - Removal of the fragile and ugly CFI dwarf debuginfo annotations.
       Conversion to C will reintroduce many of them - but meanwhile
       they are only getting in the way, and the upstream kernel does
       not rely on them (Ingo Molnar)

     - NOP handling refinements. (Borislav Petkov)

   * x86/mm changes:

     - Big PAT and MTRR rework: making the code more robust and
       preparing to phase out exposing direct MTRR interfaces to drivers -
       in favor of using PAT driven interfaces (Toshi Kani, Luis R
       Rodriguez, Borislav Petkov)

     - New ioremap_wt()/set_memory_wt() interfaces to support
       Write-Through cached memory mappings.  This is especially
       important for good performance on NVDIMM hardware (Toshi Kani)

   * x86/ras changes:

     - Add support for deferred errors on AMD (Aravind Gopalakrishnan)

       This is an important RAS feature which adds hardware support for
       poisoned data.  That means roughly that the hardware marks data
       which it has detected as corrupted but wasn't able to correct, as
       poisoned data and raises an APIC interrupt to signal that in the
       form of a deferred error.  It is the OS's responsibility then to
       take proper recovery action and thus prolonge system lifetime as
       far as possible.

     - Add support for Intel "Local MCE"s: upcoming CPUs will support
       CPU-local MCE interrupts, as opposed to the traditional system-
       wide broadcasted MCE interrupts (Ashok Raj)

     - Misc cleanups (Borislav Petkov)

   * x86/platform changes:

     - Intel Atom SoC updates

  ... and lots of other cleanups, fixlets and other changes - see the
  shortlog and the Git log for details"

* 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (222 commits)
  x86/hpet: Use proper hpet device number for MSI allocation
  x86/hpet: Check for irq==0 when allocating hpet MSI interrupts
  x86/mm/pat, drivers/infiniband/ipath: Use arch_phys_wc_add() and require PAT disabled
  x86/mm/pat, drivers/media/ivtv: Use arch_phys_wc_add() and require PAT disabled
  x86/platform/intel/baytrail: Add comments about why we disabled HPET on Baytrail
  genirq: Prevent crash in irq_move_irq()
  genirq: Enhance irq_data_to_desc() to support hierarchy irqdomain
  iommu, x86: Properly handle posted interrupts for IOMMU hotplug
  iommu, x86: Provide irq_remapping_cap() interface
  iommu, x86: Setup Posted-Interrupts capability for Intel iommu
  iommu, x86: Add cap_pi_support() to detect VT-d PI capability
  iommu, x86: Avoid migrating VT-d posted interrupts
  iommu, x86: Save the mode (posted or remapped) of an IRTE
  iommu, x86: Implement irq_set_vcpu_affinity for intel_ir_chip
  iommu: dmar: Provide helper to copy shared irte fields
  iommu: dmar: Extend struct irte for VT-d Posted-Interrupts
  iommu: Add new member capability to struct irq_remap_ops
  x86/asm/entry/64: Disentangle error_entry/exit gsbase/ebx/usermode code
  x86/asm/entry/32: Shorten __audit_syscall_entry() args preparation
  x86/asm/entry/32: Explain reloading of registers after __audit_syscall_entry()
  ...
2015-06-22 17:59:09 -07:00
Ingo Molnar
7ef3d7d58d Merge branches 'x86/apic', 'x86/asm', 'x86/mm' and 'x86/platform' into x86/core, to merge last updates
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-06-22 09:15:03 +02:00
Matt Ranostay
f267f9dff8 ALSA: hda-beep: Update authors dead email address
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-06-20 09:24:40 +02:00
Vinod Koul
d39513f851 ALSA: HDAC: move SND_HDA_PREALLOC_SIZE to core
Since this is common option for HDA driver to specfiy pre-allocated
buffer, we should make this option availble to all HDA driver by
moving this to HDA core

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-06-16 17:40:38 +02:00
Takashi Iwai
0b2d711759 Merge branch 'for-linus' into for-next
Yet another non-trivial conflicts for HDA legacy stuff.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-06-16 12:48:21 +02:00