Commit Graph

6784 Commits

Author SHA1 Message Date
Takashi Iwai 7327643ba1 ALSA: hda - Add quirk for Packard Bell EasyNote MX65
Packard Bell EasyNote MX65 with AD1986A codec needs a few fixups,
namely, the pin config overrides to set only the known I/O pins and
the EAPD has to be turned on.  In addition, add stereo mix input
forcibly for avoiding the weird KDE behavior by this update.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88251
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-17 18:03:38 +01:00
Kailang Yang 4344aec84b ALSA: hda/realtek - New codec support for ALC256
Add new support for ALC256 codec.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-17 10:46:08 +01:00
Kailang Yang 8b72415d8a ALSA: hda/realtek - Add new Dell desktop for ALC3234 headset mode
New Dell desktop needs to support headset mode for ALC3234.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-17 10:22:21 +01:00
Libin Yang 432ac1a2c0 ALSA: hda/hdmi - apply Haswell fix-ups to Skylake display codec
Skylake and Haswell have the same behavior on display audio. So this patch
applys Haswell fix-ups to Skylake.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-16 09:10:19 +01:00
Takashi Iwai 74f14b3683 ALSA: hda - Make add_stereo_mix_input flag tristate
... for distinguishing whether it's explicitly enabled via a user hint
or enabled by a driver as a fallback.  Now the former case corresponds
to HDA_HINT_STEREO_MIX_ENABLE while the latter to
HDA_HINT_STEREO_MIX_AUTO.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-15 13:46:08 +01:00
Takashi Iwai 82d04e1088 ALSA: hda - Create capture source ctls when stereo mix input is added
When the stereo mix input is explicitly enabled via a user hint, the
driver should create always a capture source enum ctl and disable the
auto-mic switch.  Otherwise the behavior gets confused.  For doing it,
this patch just sets spec->suppress_auto_mic flag appropriately.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-15 13:40:42 +01:00
Takashi Iwai c10b11f6cd ALSA: hda - Fix typos in snd_hda_get_int_hint() kerneldoc comments
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-15 13:39:10 +01:00
Libin Yang 99fcb3778b ALSA: hda - add codec ID for Skylake display audio codec
This patch adds codec ID (0x80862809) and module alias for Skylake
display codec.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-15 10:06:41 +01:00
Rafael J. Wysocki 641d334b29 sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
After commit b2b49ccbdd (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
depending on CONFIG_PM_RUNTIME may now be changed to depend on
CONFIG_PM.

Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under sound/.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Acked-by: Mark Brown <broonie@kernel.org>
2014-12-13 00:42:18 +01:00
Dan Carpenter 6e1d7a5139 ALSA: pcxhr: NULL dereference on probe failure
"card" is NULL if snd_card_new() fails.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-10 14:45:22 +01:00
Dan Carpenter feabb67e0e ALSA: lola: NULL dereference on probe failure
"card" is NULL if snd_card_new() fails.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-10 14:45:15 +01:00
Takashi Iwai 9faa73f06e ALSA: hda - Add "eapd" model string for AD1986A codec
Also update the documentation to the latest state.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-10 14:00:13 +01:00
Takashi Iwai f62f5eff3d ALSA: hda - Add EAPD fixup for ASUS Z99He laptop
The same fixup to enable EAPD is needed for ASUS Z99He with AD1986A
codec like another ASUS machine.

Reported-and-tested-by: Dmitry V. Zimin <pfzim@mail.ru>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-10 13:57:01 +01:00
Takashi Iwai 77de61c397 Merge branch 'for-next' into for-linus 2014-12-08 11:33:24 +01:00
Linus Torvalds 32f0880b5a sound fixes for 3.18-final
Just one commit for adding a copule of HD-audio quirk entries.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUga3rAAoJEGwxgFQ9KSmkEhkP/RR3FXJDiCnyrcm0IS1RFKG5
 7ludGBfjs3TEvDBRGNQui98/inXQbAPfmoyBeJiILfXle6DpgiMtw74HTw1AekxQ
 lhOGqnpgFb5ByNnU8qm/KesbhThQsyxZTwCheyHHA2QGfxlSBjNN3BruFvbGfFGE
 iobkRY0tkjdlyAd0Ufl2dZcL/ll7/giW4L+p4oSUJbW8D2L54JgsP6ey/1RtyZ2T
 7M0un4Un1sfkqpYuJFDL666m/KUXzOoZYVu0bpPuTdAt5rZ9KzOJAvzXN0N3klog
 jBO9OoTT8Vwy5r/gX08CYk+HQzkY3SZGB2Cli/XPk5dLSt8a1GyXbmnCWdFbHqLE
 ItADTPk+tnSKHq9GWqoHT980l06jABWk+231km44duqVduN9vNGvFP5Orq9FOIU7
 LAOv77fs9MaiTs0sNVhugXFIJBBJWtAcR1fRfgUmAIGB28Y+7aPN+BJ4bZCdtn4e
 AirFffn92n1hbCO7+ENRmqL/o2n4Bh049CfzX3kHtU9lAeYVzWUzfj1XtRc4FdqP
 qY045PTrqfocRbzXa3om2fd9aGjsizewrccSKNzSiPyA2ADXlrQwy8CC1VDmVOoY
 piW7soNVLBC7YMUaoig/NJr81FBJdIl4cZ1vKzfleodb1gmzShmlrzSF8zckb4sJ
 ZpXbojTD6L6oU47XyN1H
 =U558
 -----END PGP SIGNATURE-----

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

Pull sound fixlet from Takashi Iwai:
 "Just one commit for adding a copule of HD-audio quirk entries"

* tag 'sound-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek - Add headset Mic support for new Dell machine
2014-12-05 10:39:49 -08:00
Takashi Iwai fedb2245cb ALSA: hda - Fix built-in mic at resume on Lenovo Ideapad S210
The built-in mic boost volume gets almost muted after suspend/resume
on Lenovo Ideapad S210.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88121
Reported-and-tested-by: Roman Kagan <rkagan@mail.ru>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-05 18:13:47 +01:00
Joe Perches 5395103dcc ALSA: ctxfi: Neaten get_daio_rsc
Move the pointer declarations into the blocks that use them.
Neaten the kfree calls when the _init functions fail.

Trivially reduces object size (defconfig x86-64)

$ size sound/pci/ctxfi/ctdaio.o.*
   text	   data	    bss	    dec	    hex	filename
   5287	    224	      0	   5511	   1587	sound/pci/ctxfi/ctdaio.o.new
   5319	    224	      0	   5543	   15a7	sound/pci/ctxfi/ctdaio.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Noticed-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-03 20:30:04 +01:00
Takashi Iwai 103884a351 ALSA: hda - Drop AZX_DCAPS_ALIGN_BUFSIZE
We introduced AZX_DCAPS_ALIGN_BUFSIZE to explicity show that the
controller needs the alignment, with a slight hope that the buffer
size alignment will be disabled as default in future.  But the reality
tells that most chips need the buffer size alignment, and it'll be
likely enabled in future, too.

This patch drops AZX_DCAPS_ALIGN_BUFSIZE to give back one more
precious DCAPS bit for future use.  At the same time, rename
AZX_DCAPS_BUFSIZE with AZX_DCAPS_NO_ALIGN_BUFSIZE for avoiding
confusion.

AZX_DCAPS_ALIGN_BUFSIZE are still kept (but commented out) in each
DCAPS presets for a purpose as markers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-03 10:05:18 +01:00
Takashi Iwai b42b4afb74 ALSA: hda - Define the DCAPS preset for the old Intel chipsets
Just for improving readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-03 09:47:20 +01:00
Takashi Iwai 2e3d4de1bd Linux 3.18-rc7
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUe7l9AAoJEHm+PkMAQRiGkGcIAIryQ7NKn4IaxUtS807Lx4Ih
 obEnx7nNKZTXCZpD/7XQGHMMJyozMJR50PHZESJoHu4Luhv9h7EFRnyJ6MdqMlwn
 zla3zY0yRsHwPoJKcHbSE0CPHZz0WPQHj7IEbM+XJz2tMNJfbgTrezElmcCM4DRp
 c9ae+ggwZ2cyNYM0r2RSwSJ525WMh69f9dzSUE27fpvkllQgwqNs/jHYz8HNOEht
 FWcv5UhvzKjwJS3awULfOB3zH2QdFvVTrwAzd+kbV2Q6T6CaUoFRlhXeKUO6W2Jv
 pJM6oj8tMZUkdXEv7EQXT1kwEqC4DULTTTHs4tSF79O1ESmNfePiOwwBcwoM2nM=
 =kG1Y
 -----END PGP SIGNATURE-----

Merge tag 'v3.18-rc7' into for-next

... for allowing more cleanups of hda_intel.c driver-caps where both
upstream and for-next contain the changes.
2014-12-03 09:38:58 +01:00
Markus Elfring 5c34fdf48b ALSA: trident: Deletion of a check before snd_util_memhdr_free()
The snd_util_memhdr_free() 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>
2014-12-02 20:10:42 +01:00
Markus Elfring 057a4a55e7 ALSA: echoaudio: Deletion of a check before release_and_free_resource()
The release_and_free_resource() 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>
2014-12-02 18:40:22 +01:00
Markus Elfring 87164cc572 ALSA: asihpi: Deletion of an unnecessary check before the function call "vfree"
The vfree() function performs also input parameter validation. 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>
2014-12-02 18:39:30 +01:00
Kailang Yang b734304f15 ALSA: hda/realtek - Add headset Mic support for new Dell machine
Dell has new machines. It supports headset Mic and Headphone Mic.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-02 08:08:23 +01:00
Linus Torvalds 16cf45c09c sound fixes for 3.18-rc7
No excitement, here are only minor fixes: an endian fix for the
 new DSD format we added in 3.18, a fix for HP mute LED, and a
 fix for Native Instrument quirk.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUeC5WAAoJEGwxgFQ9KSmkaR4P/0NQWq7Vd5DsRk2DSW1XhYpQ
 gZlpxWwc7De4W4MsZQtWSQQn1e3Mm6OYa0srZGzmFQTI1ZBXLZq9O/wott4Q6QgZ
 lrWWBzgFenguA8r0bl/VGhFpySt/RE+8hi5Z/vMNG3ATHZxq3DzwE3xB3CaOc+ON
 PI5ba7XGLz2Q9txTaFD0g0EZT0uLpZnRZZDD12cHCPvAUIGL1IdvSQio3NFlia+l
 9gCTe8uZ8BPUt1+LYAcbVKl5xZn8vVOw9fUbcFj7OOoFu48ve2GgtHRVWdYyI9k9
 F6yBOMUQtw+XyKvlcectNbEX/6ORewIV0m15damK4REMQeCapGIaoTXMB6yRd3Ld
 zyj1Ld/JAxqrd3Iy0wF4tP/SHy+fJ1e+WSe5rIurCMlUa4CXkSwX65n1DCuonbsG
 GsVaXlspSk2j/ZhkqB0rDqTQKqKxSrutqHHwwsfA41iRpOUECmUZU8wM/mj/0THV
 0RoWYbJjc0STs+x0ysVo2OudumnMcEhx56SHqJK8Kr1y16m9boxn2exk139qMDb/
 Ua6ZGxJiohNICzHsADDcETtnfzOc1bTDhyP058cKAmtmw/U91zpyEAp40xAUe+hL
 Ix/z8yVjyIM8RLNizxad90s00hpOmOHDp/idLH4Ok8DoDx97IVhHzqyu8mbiTp8A
 wb69fsQApL/lRoTVDbtU
 =azkh
 -----END PGP SIGNATURE-----

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

Pull sound fixes from Takashi Iwai:
 "No excitement, here are only minor fixes: an endian fix for the new
  DSD format we added in 3.18, a fix for HP mute LED, and a fix for
  Native Instrument quirk"

* tag 'sound-3.18-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: pcm: Add big-endian DSD sample formats and fix XMOS DSD sample format
  ALSA: hda - One more HP machine needs to change mute led quirk
  ALSA: usb-audio: Use snd_usb_ctl_msg() for Native Instruments quirk
2014-11-28 13:54:53 -08:00
Takashi Iwai 5031466387 Merge branch 'for-linus' into for-next
The commit [7a2e9ddc: ALSA: usb-audio: Add native DSD support for
Denon/Marantz DACs] requires the new format definition that has
landed only in for-next branch.
2014-11-28 18:30:19 +01:00
Takashi Iwai 7c7320157a ALSA: hda - Allow forcibly enabling/disabling snoop
User can pass snoop option to enable/disable the snoop behavior, but
currently azx_check_snoop_available() always turns it off for some
devices.  For better debuggability, change the parameter as bint, and
allow user to enable/disable forcibly the snoop when specified via the
module option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-28 08:47:29 +01:00
Takashi Iwai 37e661ee10 ALSA: hda - Add AZX_DCAPS_SNOOP_OFF (and refactor snoop setup)
Add a new driver_caps bit, AZX_DCAPS_SNOOP_OFF, to set the snoop off
as default.  This new bit is used for the checks in
azx_check_snoop_available().  Most of case-switches are replaced with
the new dcaps in each entry.

While working on it, for avoiding to spend more bits, combine three
bits AZX_DCAPS_SNOOP_SCH, AZX_DCAPS_SNOOP_ATI and
AZX_DCAPS_SNOOP_NVIDIA bits into a flat type of two bits.  This
reduces the bits usages, and assign AZX_DCAPS_OFF to this empty bit
now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-28 08:47:28 +01:00
Takashi Iwai acf403ecc4 Merge branch 'topic/usb-resume' into for-next
Merge the proper mixer resume support for quirk codes.
2014-11-27 12:40:51 +01:00
Dan Carpenter 69eba10e60 ALSA: hda - using uninitialized data
In olden times the snd_hda_param_read() function always set "*start_id"
but in 2007 we introduced a new return and it causes uninitialized data
bugs in a couple of the callers: print_codec_info() and
hdmi_parse_codec().

Fixes: e8a7f136f5 ('[ALSA] hda-intel - Improve HD-audio codec probing robustness')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-27 09:34:41 +01:00
Benjamin Herrenschmidt db79afa1e5 sound/radeon: Move 64-bit MSI quirk from arch to driver
A number of radeon cards have a HW limitation causing them to be
unable to generate the full 64-bit of address bits for MSIs. This
breaks MSIs on some platforms such as POWER machines.

We used to have a powerpc specific quirk to address that on a
single card, but this doesn't scale very well, this is better
put under control of the drivers who know precisely what a given
HW revision can do.

We now have a generic quirk in the PCI code. We should set it
appropriately for all radeon's from the audio driver.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
CC: <stable@vger.kernel.org>
2014-11-24 14:17:34 +11:00
Takashi Iwai 413cbf469a ALSA: hda - Limit 40bit DMA for AMD HDMI controllers
AMD/ATI HDMI controller chip models, we already have a filter to lower
to 32bit DMA, but the rest are supposed to be working with 64bit
although the hardware doesn't really work with 63bit but only with 40
or 48bit DMA.  In this patch, we take 40bit DMA for safety for the
AMD/ATI controllers as the graphics drivers does.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: <stable@vger.kernel.org>
2014-11-24 14:02:53 +11:00
Eliot Blennerhassett 51e6f47dd2 ALSA: asihpi: used parts of message/response are zeroed before use
Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:34:06 +01:00
Eliot Blennerhassett dc612838ea ALSA: asihpi: don't fail probe if adapter mode read fails
Only determining if low latency mode is enabled. Failure
indicates adapter has no modes

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:33:48 +01:00
Eliot Blennerhassett 12eb089874 ALSA: asihpi: Use standard printk helpers
Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:33:37 +01:00
Eliot Blennerhassett 5bc91f5b3c ALSA: asihpi: Turn off msg/resp logging after DSP has crashed.
Prevents spewing of useless messages if app keeps trying to
access the card.

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:33:25 +01:00
Eliot Blennerhassett f9a376c3f6 ALSA: asihpi: Add support for stream interrupt.
Some cards have a so-called low-latency mode, in which they present
a single multichannel stream with no mixing or samplerate conversion.
In this mode the card can generate an interrupt per internal processing
block (typically 32 or 64 frames)

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:33:13 +01:00
Eliot Blennerhassett c1464a8854 ALSA: asihpi: Refactor control cache code.
Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:29:58 +01:00
Eliot Blennerhassett e51c58c982 ALSA: asihpi: Use CONFIG_64BIT directly
Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:28:36 +01:00
Eliot Blennerhassett 35a8dc1f66 ALSA: asihpi: Logging format improvements
Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:27:04 +01:00
Eliot Blennerhassett 3872f19d96 ALSA: asihpi: New I/O types - AVB & BLUlink, DAB Rf receiver
Audio cards wth have AVB or BLU Link IO.
Tuner card with DAB receiver

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:25:51 +01:00
Eliot Blennerhassett e9886ab06c ALSA: asihpi: Minor string and dead code cleanup
Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-22 22:25:02 +01:00
Hui Wang 911f632c70 ALSA: hda - One more HP machine needs to change mute led quirk
The machine originally use the quirk ALC269_FIXUP_HP_GPIO_MIC1_LED,
but the LED doesn't work at all.

After this change, the machine will change to use
ALC269_FIXUP_HP_MUTE_LED_MIC1 through pin_fixup_tbl[], and the LED
works well.

BugLink: https://bugs.launchpad.net/bugs/1389497
Tested-by: TieFu Chen <tienfu.chen@canonical.com>
Cc: Kailang Yang <kailang@realtek.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-21 10:58:08 +01:00
Kailang Yang eaa8e5ef18 ALSA: hda/realtek - Supported HP mute Led for ALC286
New HP machine supported output mute led and input mute led.
ALC286:
GPIO1 to control output mute led.
GPIO5 to control input mute led.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-21 10:56:52 +01:00
Takashi Iwai a69862d8d0 Merge branch 'for-linus' into test/usb-resume 2014-11-20 21:46:04 +01:00
Takashi Iwai 0f32fd1900 ALSA: hda/realtek - Clean up mute/mic GPIO LED handling
There are a few duplicated codes handling the mute and mic-mute LEDs
via GPIO pins.  Let's consolidate to single helpers.  Here we
introduced two new fields to alc_spec, gpio_mute_led_mask and
gpio_mic_led_mask, to contain the bit mask to set/clear.  Also,
mute_led_polarity is evaluated as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-20 11:02:18 +01:00
Hui Wang 6676f3081f ALSA: hda - fix the mic mute led problem for Latitude E5550
The microphone mute led on the Latitude E5550 can't work. We need to
apply DELL_WMI_MIC_MUTE_LED quirk to this machine.

The machine uses alc293 codec and already applied the quirk
ALC293_FIXUP_DELL1_MIC_NO_PRESENCE through pin_fixup_tbl[].

Here we just let DELL_WMI_MIC_MUTE_LED be chained to
ALC269_FIXUP_HEADSET_MODE, then the machine will have these
quirks ALC293_FIXUP_DELL1_MIC_NO_PRESENCE-->
ALC269_FIXUP_HEADSET_MODE-->ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED.

BugLink: https://bugs.launchpad.net/bugs/1381856
Reported-and-tested-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-18 11:06:03 +01:00
Hui Wang 4a83d42ae2 ALSA: hda - move DELL_WMI_MIC_MUTE_LED to the tail in the quirk chain
We have one more Dell machine needs DELL_WMI_MIC_MUTE_LED quirk, but
the machine uses alc293 instead of alc255. So if
DELL_WMI_MIC_MUTE_LED still chain ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
the machine can't use this quirk.

To change this situation, let the DELL_WMI_MIC_MUTE_LED to be a
standalone quirk, and let other quirks chain it.

After this change, this quirk can be chained to any existing quirks,
and as a result, it is possible that this quirk is applied to
a non-Dell machine or a Dell machine without mic mute led on it, but
it is still safe since alc_fixup_dell_wmi() will return an error in
these situations.

And remove the quirk for machine with subsystem id 0x6010 and 0x601f,
these two machines will fall back to the quirk
ALC255_FIXUP_DELL1_MIC_NO_PRESENCE-->ALC255_FIXUP_HEADSET_MODE-->
ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED through pin_fixup_tbl[].

BugLink: https://bugs.launchpad.net/bugs/1381856
Reported-and-tested-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-18 11:05:45 +01:00
Markus Elfring c283661018 ALSA: hdsp: Deletion of an unnecessary check before the function call "release_firmware"
The release_firmware() function tests whether its argument is NULL and then
return 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>
2014-11-17 13:46:46 +01:00
Markus Elfring 6da95e1ea8 ALSA: lola: Deletion of an unnecessary check before the function call "vfree"
The vfree() function performs also input parameter validation. 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>
2014-11-17 13:46:23 +01:00
Markus Elfring ae1b22658e ALSA: ice17xx: Deletion of unnecessary checks before the function call "snd_ac97_resume"
The snd_ac97_resume() 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>
2014-11-17 13:45:51 +01:00
Markus Elfring f0acd28c87 ALSA: hda: Deletion of unnecessary checks before two function calls
The functions kfree() and release_firmware() test whether their argument
is NULL and then return 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>
2014-11-17 13:45:23 +01:00
Sudip Mukherjee b8eca77e54 ALSA: ice1712: consider error value
earlier we were ignoring the return value of snd_ak4114_create and
always returning 0.
now we are returning the actual status. revo_init is calling this
function, and revo_init is checking the return value.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-14 14:16:47 +01:00
Sudip Mukherjee b393df0145 ALSA: ice1712: remove unused variable
buf_size was initialized with snd_pcm_lib_buffer_bytes,
but never used. and so it is safe to be deleted.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-14 14:16:43 +01:00
Sudip Mukherjee 387417b562 ALSA: ice1712: remove unneeded return statement
the functions:
        snd_ice1712_akm4xxx_build_controls
        snd_ice1712_build_pro_mixer
        snd_ctl_add
        snd_ak4114_build
        prodigy192_ak4114_init
        snd_ak4113_build
are all returning either 0 or a negetive error value.
so we can easily remove the check for a negative value and return
the value instead.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-14 14:16:36 +01:00
Takashi Iwai 3542aed748 ALSA: hda - Add mute LED control for Lenovo Ideapad Z560
Lenovo Ideapad Z560 has a mute LED that is controlled via EAPD pin
0x1b on CX20585 codec.  (EAPD bit on corresponds to mute LED on.)
The machine doesn't need other EAPD, so the fixup concentrates on
controlling EAPD 0x1b following the vmaster state (but inversely).

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=665315
Reported-by: Szymon Kowalczyk <fazerxlo@o2.pl>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-13 09:12:03 +01:00
Kailang Yang 394c97f824 ALSA: hda/realtek - Change EAPD to verb control
This will fix no sound in Linux system after reboot from windows.

Change log:
- alc662_fill_coef() is replaced with alc_fill_eapd_coef_idx()
  and move into alc_auto_init_amp().
- For ALC262, ALC267, ALC268, ALC269, ALC233, ALC255, ALC280, ALC282,
  ALC283, ALC284, ALC285, ALC286, ALC288, ALC290, ALC292, ALC293, ALC294,
  ALC668, ALC888VC, ALC888VD, ALC891, ALC892, ALC898 and ALC1150, add update
  COEF control for EAPD setting.
- Remove alc269_fill_coef() for update EAPD control line.

ADDITIONAL NOTE:
Many Realtek cdoecs have a COEF bit to switch the master amp control
between COEF and EAPD.  Windows drivers seem using COEF while we use
EAPD, which is more standard.  As a result, some system suffer from
the silent output when booting after Windows.  This patch sets the
COEF bits on the relevant codecs properly to switch to EAPD control.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=87771
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-12 11:34:13 +01:00
Takashi Iwai ddcecf6b6a ALSA: Fix invalid kerneldoc markers
They are no real kerneldoc comments, so drop such markers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-11 09:39:17 +01:00
Takashi Iwai 3f60c87d12 ALSA: mixart: Fix kerneldoc comments
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-11 09:39:13 +01:00
Takashi Iwai e60b2c7fcd ALSA: hda - Fix kerneldoc errors in patch_ca0132.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-11 09:39:11 +01:00
Takashi Iwai 2a9e8df009 ALSA: vx: Fix missing kerneldoc parameter descriptions
The file isn't processed, but it's not bad to fix beforehand.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-11 09:39:10 +01:00
Takashi Iwai 1fb8510cdb ALSA: pcm: Add snd_pcm_stop_xrun() helper
Add a new helper function snd_pcm_stop_xrun() to the standard sequnce
lock/snd_pcm_stop(XRUN)/unlock by a single call, and replace the
existing open codes with this helper.

The function checks the PCM running state to prevent setting the wrong
state, too, for more safety.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-09 18:20:40 +01:00
Devin Ryles b456591346 ALSA: hda_intel: Add DeviceIDs for Sunrise Point-LP
This patch adds DeviceIDs for Sunrise Point-LP

Signed-off-by: Devin Ryles <devin.ryles@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-08 20:58:30 +01:00
Kailang Yang f3f9185f3e ALSA: hda/realtek - Restore default value for ALC668
Restore the registers to prevent the abnormal digital power supply
rising ratio/sequence to the codec and causing the incorrect default
codec register restoration during initialization.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-06 00:09:57 +01:00
Takashi Iwai 19566b0bd9 Merge branch 'for-linus' into for-next
This merges the USB-audio disconnect fix and resolves the conflicts
so that we can continue working on development of usb-audio stuff.

Conflicts:
	sound/usb/card.c
2014-11-05 15:37:22 +01:00
Sudip Mukherjee 9161bd0d1c ALSA: echoaudio: cleanup of unnecessary messages
commit "b5b4a41b392960010fccf1f9ccf8334d612bd450" was dereferencing
chip after it has been freed. This patch fixes that and at the same
time removes some debugging messages, which are unnecessary, as they
are just printing information about entry and exit from a function,
and which switch-case it is executing.
we can easily get from ftrace the information about the entry and exit
from a function.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-05 15:35:57 +01:00
Hui Wang c922c4e87b ALSA: hda - fix mute led problem for three HP laptops
Without the fix, the mute led can't work on these three machines.

After apply this fix, these three machines will fall back on the led
control quirk as below, and through testing, the mute led works very
well.
PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED,
            ALC282_STANDARD_PINS,
            {0x12, 0x90a60140},
            ...

BugLink: https://bugs.launchpad.net/bugs/1389497
Tested-by: TieFu Chen <tienfu.chen@canonical.com>
Cc: Kailang Yang <kailang@realtek.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-05 07:42:15 +01:00
Markus Elfring 31604d35db ALSA: emu10k1: Deletion of unnecessary checks before three function calls
The functions kfree(), release_firmware() and snd_util_memhdr_free() test
whether their argument is NULL and then return 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>
2014-11-03 15:16:14 +01:00
Sudip Mukherjee b5b4a41b39 ALSA: echoaudio: remove all snd_printk
removed all references of snd_printk with the standard dev_* macro.

[a few places degraded to dev_dbg(), too -- tiwai]

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-03 14:07:25 +01:00
Sudip Mukherjee e369086968 ALSA: echoaudio: add reference of struct echoaudio
added reference of struct echoaudio to free_firmware function.
this structure will be later used to get a reference of the card
when converting snd_printk to dev_* in the next patch of the series.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-03 14:02:33 +01:00
Takashi Iwai 4c41421657 Merge branch 'topic/kerneldoc' into for-next 2014-10-31 09:31:06 +01:00
Takashi Iwai dda42bd0c3 ALSA: hda - Add kerneldoc comments to hda_generic.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-30 12:04:50 +01:00
Kailang Yang 1df8874bfa ALSA: hda/realtek - Update Initial AMP for EAPD control
The default EAPD control uses verb command to control EAPD. Some codec
does not have verb command for EAPD. It needs to control by hidden
register.

This update will avoid wrong behavior for some codec.  This patch will
fix double setup for EAPD.  It just needs to turn on by one site for
verb command or hidden register controlled.

Detailed changes:
- alc889_coef_init() is replaced with alc_update_coef_idx() with a
  correct COEF value.
- for ALC262, ALC887 and ALC900, the EAPD setup via the hidden
  register is removed because this rather conflicts with the EAPD verb
  setup.
-  For ALC888-VC, also the hidden register access is removed in
  alc888_coef_init().
- Remove the dead #if 0 code for ALC267/ALC268.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-30 09:01:17 +01:00
David Henningsson cf51eb9d0c ALSA: hda - change three SSID quirks to one pin quirk
These three HP machines all have the same pin config, so we can
change it to a pin quirk.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-30 08:59:53 +01:00
David Henningsson 7a5255f17d ALSA: hda - Set GPIO 4 low for a few HP machines
These HP machines needs GPIO 4 low to enable the headphone amplifier.
In addition, we still need to control LEDs via vref and GPIO.

Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/bugs/1387128
Tested-by: TienFu Chen <tienfu.chen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-30 08:59:52 +01:00
Takashi Iwai ce40a6d3ad Merge branch 'topic/kerneldoc' into for-next 2014-10-30 08:05:12 +01:00
Tina Ruchandani eafe8404c1 ALSA: es1968: Replace timeval with ktime_t
es1968_measure_clock uses struct timeval, which on 32-bit systems will overflow
in 2038, leading to incorrect interpretation of time.This patch changes the
function to use ktime_t instead of struct timeval, which implies:
- no y2038: ktime_t uses a 64-bit datatype explicitly.
- efficent subtraction: The earlier version computes the difference in usecs
  while dealing with secs and nsecs. It requires checks to see if the nsecs of
  stop is less than start. This patch uses a direct subtract of ktime_t and
  converts to usecs.
- use of monotonic clock (ktime_get) over real time (do_gettimeofday),
  which simplifies timekeeping, as it does not have to deal with cases
  where stop_time is less than start_time.

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-30 08:04:33 +01:00
Lukas Bossard 7c21539c45 ALSA: hda - Add ultra dock support for Thinkpad X240.
Adding ultra doch support for Lenovo Thinkpad X240 (17aa:2214).
[Actually replaced the entry with ALC292_FIXUP_TPT440_DOCK -- tiwai]

Signed-off-by: Lukas Bossard <mr.bobukas@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-30 08:03:29 +01:00
Takashi Iwai 3b70bdba2f ALSA: hda - Add workaround for CMI8888 snoop behavior
CMI8888 shows the stuttering playback when the snooping is disabled
on the audio buffer.  Meanwhile, we've got reports that CORB/RIRB
doesn't work in the snooped mode.  So, as a compromise, disable the
snoop only for CORB/RIRB and enable the snoop for the stream buffers.

The resultant patch became a bit ugly, unfortunately, but we still can
live with it.

Reported-and-tested-by: Geoffrey McRae <geoff@spacevs.com>
Cc: <stable@vger.kernel.org> # 3.17+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-29 16:16:29 +01:00
Sudip Mukherjee df57de172a ALSA: hdspm: remove unused variable
removed the unused variables. These variables were only being
assigned some value, but the values were never being used.

it has been build tested after removing the variables.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-29 16:12:32 +01:00
Takashi Iwai 95a962c36f ALSA: hda - More kerneldoc comments
Put more kerneldoc comments to the exported functions.
Still the generic parser code and the HD-audio controller code aren't
covered yet, though.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-29 16:03:58 +01:00
Takashi Iwai a11e9b1686 ALSA: hda - Correct kerneldoc comments
Complete the missing parameters and fix anything wrong there.
Just comment changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-29 15:06:54 +01:00
Takashi Iwai f994cb3a09 ALSA: au88x0: Kill the rest snd_print*()
Use the standard dev_*() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-28 17:40:45 +01:00
Takashi Iwai f48a6df282 ALSA: pcxhr: Kill the rest snd_print*()
Use the standard dev_*() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-28 17:40:43 +01:00
Takashi Iwai 2e6705c090 ALSA: ctxfi: Kill the rest snd_print*()
Use the standard dev_*() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-28 17:40:42 +01:00
Aya Mahfouz 326f0480b7 ALSA: pcxhr: convert timeval to ktime_t
This patch is concerned with migrating the time variables in the pcxhr
module found in the sound driver. The changes are concerend with the
y2038 problem where timeval will overflow in the year 2038. ktime_t
was used instead of timeval to get the wall time. The difference
is displayed now in nanoseconds instead of microseconds.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-28 15:07:25 +01:00
Takashi Iwai 66797f36fd ALSA: hda - Pass printf argument directly to request_module()
request_module() handles the printf style arguments, so we don't have
to render strings in the caller side.  Not only it reduces the
unnecessary temporary string buffer, it's even safer from the security
POV.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-27 15:17:54 +01:00
Takashi Iwai 85c24cd8d3 Merge branch 'for-linus' into for-next
Merged upstream branch to make further fireworks development easier
(and avoid conflicts earlier).

Conflicts:
	sound/firewire/bebob/bebob_focusrite.c
2014-10-27 14:11:07 +01:00
Kailang Yang 6a98e34b58 ALSA: hda/realtek - New SSID for Headset quirk
It is lite version of AIO machine(0x0626).
The audio layout of this machine was similar with SSID 0x0626.
The audio was same as commit ad8ff99e6b.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-27 09:54:23 +01:00
Joe Perches ccbec5ea0d ALSA: ad1889: Fix probable mask then right shift defects
Precedence of & and >> is not the same and is not left to right.
shift has higher precedence and should be done after the mask.

Add parentheses around the mask.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-27 08:40:18 +01:00
Kailang Yang 56779864f1 ALSA: hda/realtek - Update restore default value for ALC283
Update two records for ALC283 for restore default value.

[The update doesn't seem to have high impact on the existing machines,
 but it fixes possible issues, especially expected in BIOS changes on
 new machines, according to Realtek -- tiwai]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-24 15:55:53 +02:00
Kailang Yang 32fa7e4977 ALSA: hda/realtek - Update restore default value for ALC282
Update default value for ALC282 for COEF.

[The update doesn't seem to have high impact on the existing machines,
 but it fixes possible issues, especially expected in BIOS changes on
 new machines, according to Realtek -- tiwai]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-24 15:54:29 +02:00
David Henningsson fb54a645b2 ALSA: hda - Add missing terminating entry to SND_HDA_PIN_QUIRK macro
Without this terminating entry, the pin matching would continue
across random memory until a zero or a non-matching entry was found.

The result being that in some cases, the pin quirk would not be
applied correctly.

Cc: stable@vger.kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-24 10:04:29 +02:00
Takashi Iwai 930352862e Merge branch 'topic/enum-info-cleanup' into for-next
this is a series of patches to just convert the plain info callback
for enum ctl elements to snd_ctl_elem_info().  Also, it includes the
extension of snd_ctl_elem_info(), for catching the unexpected string
cut-off and handling the zero items.
2014-10-22 12:19:57 +02:00
Takashi Iwai b46882b6eb Merge branch 'topic/hda-lo-jack' into for-next 2014-10-22 07:57:12 +02:00
Sudip Mukherjee cf6814f2b5 ALSA: ctxfi: remove unused variable
As of now the pointer to struct dai is not being used anywhere in the
function. So it is safe to remove the variable.
If we are ever doing anything with the container_of(daio, struct dai, daio),
then at that time we can again add the variable.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 16:06:13 +02:00
Takashi Iwai 9883ab91e3 ALSA: via82xx: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to the text array.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:13:24 +02:00
Takashi Iwai 3e4bc5b78e ALSA: sonicvibes: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to the text array.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:12:51 +02:00
Takashi Iwai 7298ece7a2 ALSA: rme9652: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:12:11 +02:00
Takashi Iwai c69a637b4d ALSA: hdspm: Use snd_ctl_enum_info()
... and reduce the open codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:10:58 +02:00
Takashi Iwai 8d678da9f0 ALSA: hdsp: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:10:53 +02:00
Takashi Iwai 9c30d46a0f ALSA: rme96: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:07:50 +02:00
Takashi Iwai 11c6ef7c8d ALSA: rme32: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:05:24 +02:00
Takashi Iwai 08455ace3c ALSA: pcxhr: Use snd_ctl_enum_info()
... and reduce the open codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:04:18 +02:00
Takashi Iwai f861237c80 ALSA: korg1212: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:04:07 +02:00
Takashi Iwai 597da2e4df ALSA: ice1724: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:02:50 +02:00
Takashi Iwai c4fa251f6f ALSA: ice1712: Use snd_ctl_enum_info()
... and reduce the open codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:01:06 +02:00
Takashi Iwai 3ff7221932 ALSA: hda: Use snd_ctl_enum_info()
... and reduce the open codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:00:49 +02:00
Takashi Iwai ca776a28ae ALSA: fm801: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to the text array.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 09:00:29 +02:00
Takashi Iwai 6b6b295e80 ALSA: es1938: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to the text array.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:59:59 +02:00
Takashi Iwai 1541c66d3b ALSA: emu10k1: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:59:23 +02:00
Takashi Iwai c69a4f3046 ALSA: echoaudio: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:56:28 +02:00
Takashi Iwai de95eae25a ALSA: ca0106: Use snd_ctl_enum_info()
... and reduce the open codes.  Also correct the array size and add
missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:55:04 +02:00
Takashi Iwai 9b311a0ad9 ALSA: azt3328: Use snd_ctl_enum_info()
... and reduce the open codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:53:54 +02:00
Takashi Iwai 4d765e48c5 ALSA: aw2: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to the text array.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:53:43 +02:00
Takashi Iwai 30d0ae425a ALSA: asihpi: Use snd_ctl_enum_info()
... and reduce the open codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:52:13 +02:00
Takashi Iwai 1bc10bb68d ALSA: ac97: Constify more text arrays
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:51:45 +02:00
Takashi Iwai 3b7a00dc9e ALSA: ac97: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:49:43 +02:00
David Henningsson 3abb4f4d0e ALSA: hda - Use "Line Out" name instead of "PCM" when there are other outputs
In case there are speakers or headphones as well, anything that only
covers the line out should not be labelled "PCM". Let's name it
"Line Out" instead for clarity.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-20 13:38:10 +02:00
David Henningsson 03ad6a8c93 ALSA: hda - Fix "PCM" name being used on one DAC when there are two DACs
In the scenario where there is one "Line Out", one "Speaker" and one
"Headphone", and there are only two DACs, two outputs will share a DAC.
Currently any mixer on such a DAC will get the "PCM" name, which is
misleading. Instead use "Headphone+LO" or "Speaker+LO" to better
specify what the volume actually controls.

[fixed missing slave string additions by tiwai]

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-20 13:37:50 +02:00
Takashi Iwai b1974f965a ALSA: hda - Fix inverted LED gpio setup for Lenovo Ideapad
We implemented in a wrong way for mute LED on Lenovo Ideapad; the bit
must be flipped.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16373
Fixes: 3e887f379d ('ALSA: hda - Add mute LED support to Lenovo Ideapad')
Cc: <stable@vger.kernel.org> # 3.15+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-20 11:31:40 +02:00
Takashi Iwai e200953673 Merge branch 'topic/cleanup' into for-next 2014-10-20 08:44:25 +02:00
Anssi Hannula 6acce400d9 ALSA: hda - hdmi: Fix missing ELD change event on plug/unplug
The ELD ALSA control change event is sent by hdmi_present_sense() when
eld_changed is true.

Currently, it is only true when the ELD buffer contents have been
modified. However, the user-visible ELD controls also change to a
zero-length value and back when eld_valid is unset/set, and no event is
currently sent in such cases (such as when unplugging or replugging a
sink).

Fix the code to always set eld_changed if eld_valid value is changed,
and therefore to always send the change event when the user-visible
value changes.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Cc: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@vger.kernel.org> # 3.9+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-20 07:58:34 +02:00
Harsha Priya b450b17c15 ALSA: ALC283 codec - Avoid pop noise on headphones during suspend/resume
This patch sets the headphones mode to default before suspending
which helps avoid the pop noise on headphones

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-20 07:49:40 +02:00
Sudip Mukherjee 70c84418bf ALSA: au88x0: pr_* replaced with dev_*
pr_* macros replaced with dev_* as they are more preffered over pr_*.
each file which had pr_* was reviewed manually and replaced with dev_*.
here we have actually used the reference of the vortex which was added
to some functions in the previous patch of this series.

The prefix of the CARD_NAME and prefix of "vortex:" was also
removed as the dev_* will print the device name.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-15 12:03:18 +02:00
Sudip Mukherjee 6a40dc5ab5 ALSA: au88x0: added reference of vortex_t
added a pointer of the vortex in the following functions :

vortex_alsafmt_aspfmt
vortex_Vort3D_InitializeSource
a3dsrc_ZeroStateA3D

so that we can have a reference of the vortex in the function.
this reference of the vortex will actually be used in a later patch
to convert the pr_* macro to dev_*.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-15 12:03:05 +02:00
James Ralston c8b00fd2f4 ALSA: hda_intel: Add Device IDs for Intel Sunrise Point PCH
This patch adds the HD Audio Device IDs for the Intel Sunrise Point PCH.

[the item position rearranged by tiwai]

Signed-off-by: James Ralston <james.d.ralston@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-15 11:39:58 +02:00
Takashi Iwai 95926035b1 ALSA: emu10k1: Fix deadlock in synth voice lookup
The emu10k1 voice allocator takes voice_lock spinlock.  When there is
no empty stream available, it tries to release a voice used by synth,
and calls get_synth_voice.  The callback function,
snd_emu10k1_synth_get_voice(), however, also takes the voice_lock,
thus it deadlocks.

The fix is simply removing the voice_lock holds in
snd_emu10k1_synth_get_voice(), as this is always called in the
spinlock context.

Reported-and-tested-by: Arthur Marsh <arthur.marsh@internode.on.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-14 09:18:02 +02:00
Takashi Iwai c497d9f917 ALSA: hda - Add dock port support to Thinkpad L440 (71aa:501e)
Yet another Thinkpad model that has a dock port.

Reported-by: Sascha Wilde <wilde@intevation.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-08 12:14:40 +02:00
Takashi Iwai 6d16941aee ALSA: hda - Add dock support for Thinkpad T440 (17aa:2212)
There is another Thinkpad T440 with SSID 17aa:2212 that has a dock
port.

Reported-by: Siwei Luo <sluo@smartbeans.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-07 17:27:02 +02:00
David Henningsson 9d36a7dc4d ALSA: hda - Make the inv dmic handling for Realtek use generic parser
From what I can see, the generic parser is now good enough to handle
Realtek's inverted dmic handling, so let's remove the special handling
and use the generic parser instead.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-07 12:01:48 +02:00
David Henningsson a33cc48d28 ALSA: hda - Add Inverted Internal mic for Samsung Ativ book 9 (NP900X3G)
In this case, it looks like the right channel records noise rather
than the inverted signal, but the simplest way is to just call it
"Inverted Internal Mic", which will cause it to be muted by default.

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

BugLink: https://bugs.launchpad.net/bugs/1316518
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-07 12:01:36 +02:00
David Henningsson 522a7fa883 ALSA: hda - Add inverted internal mic for Asus Aspire 4830T
Alsa-info at https://launchpadlibrarian.net/186697318/alsa-info.txt.37fYWkaJRc

Reported-by: Tomas Nilsson <tomas.k.nilsson@gmail.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-07 12:01:16 +02:00
Takashi Iwai 8df22a4d6f ASoC: Updates for v3.18
- More componentisation work from Lars-Peter, this time mainly
    cleaning up the suspend and bias level transition callbacks.
  - Real system support for the Intel drivers and a bunch of fixes and
    enhancements for the associated CODEC drivers, this is going to need
    a lot quirks over time due to the lack of any firmware description of
    the boards.
  - Jack detect support for simple card from Dylan Reid.
  - A bunch of small fixes and enhancements for the Freescale drivers.
  - New drivers for Analog Devices SSM4567, Cirrus Logic CS35L32, Everest
    Semiconductor ES8328 and Freescale cards using the ASRC in newer i.MX
    processors.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJUMoHRAAoJECTWi3JdVIfQGXUH/RWQ6/Ey70SPgUdWWQ42PFey
 sBq/Hl69F8/JNxW6EDA4GEg6ue880Gek0oGqioxtN6Ku0Vm/WSqDWnKcTAGl4dDO
 AefC4FwekZWCYQi3VTNIvMEqfUWkcofTLVwjdh/PUZxniahkiGA81UJ1mQNXBxLF
 UusrK0fIAxQgiNsCcPZ94knJiqZVBWgbRv/mCXY9K1/jqITNKd/ZVEMkOPk/p00q
 cH9LIx8EknRV3HyJNZQ0xpmhpuMzLy6Agf7Oeq/m5kDqq1stmClvibPYkdqkdkto
 jYwKaPh18dNHlUmm1w/G7X20kCidhbiwRjS/iIzx3cfIrWkiz90/BSRFKs8pqSo=
 =7PPg
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v3.18

 - More componentisation work from Lars-Peter, this time mainly
   cleaning up the suspend and bias level transition callbacks.
 - Real system support for the Intel drivers and a bunch of fixes and
   enhancements for the associated CODEC drivers, this is going to need
   a lot quirks over time due to the lack of any firmware description of
   the boards.
 - Jack detect support for simple card from Dylan Reid.
 - A bunch of small fixes and enhancements for the Freescale drivers.
 - New drivers for Analog Devices SSM4567, Cirrus Logic CS35L32, Everest
   Semiconductor ES8328 and Freescale cards using the ASRC in newer i.MX
   processors.
2014-10-06 14:01:11 +02:00
Sudip Mukherjee 0cae90a96c ALSA: ctxfi: pr_* replaced with dev_*
pr_* macros replaced with dev_* as they are more preffered over pr_*.
each file which had pr_* was reviewed manually and replaced with dev_*.
here we have actually used the various snd_card which was added to some
structures of ctxfi via a previous patch of this series.

in the ctvmem.c file we have passed a reference of ct_atc as an
argument to get_vm_block function so that it can be used from
dev_*.

since dev_* will print the device information , so the prefix of
"ctxfi" from the various pr_* were also removed.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-30 10:36:59 +02:00
Sudip Mukherjee a45c4d5142 ALSA: ctxfi: ctatc: added reference to snd_card
added reference of the card in the convert_format function
so that we can know which card has called the function.
this reference of the snd_card will actually be used in a later patch
to convert the pr_* macro to dev_*.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-30 10:36:36 +02:00
Sudip Mukherjee e5347f9ab7 ALSA: ctxfi: initialized snd_card
initialized the reference of snd_card which was added to the various
structures through the previous patch of the series.
these references of snd_card will be used in a later patch to convert
the pr_* macros to dev_*

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-30 10:36:12 +02:00
Sudip Mukherjee 3d0fdc86e4 ALSA: ctxfi: added reference of snd_card
added a pointer of snd_card in some of the structures to get a
reference of the card from other functions.
these references of snd_card will be initialised in the next patch
of this series and as of now these snd_card will be used to print the
the device information when we convert the pr_* macros to dev_* in a
later patch of this series.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-30 10:35:48 +02:00
Sudip Mukherjee b6bfe86fd2 ALSA: ctxfi: removed typecast to (struct hw *)
the previous patch of the series has converted the void * to
struct hw * . Now this patch removes the typecasting to (struct hw *)
which is not needed any more.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-30 10:35:21 +02:00
Sudip Mukherjee 66640898ed ALSA: ctxfi: changed void * to struct hw *
in the code we have void *hw and while using we are always typecasting
it to (struct hw *). it is better to use void type of pointer when we
store different types of pointer , but in this code we are only having
struct hw.
So changed all the relevant reference of void *hw to struct hw *hw,
without any modification of the existing code logic.
the next patch of the series will remove the typecasting which is
not required now.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-30 10:34:29 +02:00
Sudip Mukherjee 7a7686bd0d ALSA: ctxfi: sparse warning
fixed sparse warning of incorrect type (different address spaces) in
cthw20k1.c and cthw20k2.c which was being actually caused as mem_base
was of the type unsigned long.

Again as mem_base was previously unsigned long , so it required many
typecasts in the code to convert interger to pointer.

Now after giving the correct type of mem_base as void __iomem *
we can also remove those typecasts maintaining the same functionality
and logic of the code.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-23 16:00:31 +02:00
David Henningsson 95f72cf2cd ALSA: hda - Sort input pins depending on amp caps
If one input has a boost and another one has not, and they're equal
otherwise, it's more likely you want to use the input with the boost
as your primary input.

See hda-emu.git/codecs/canonical/cx20590-lenovo-20b2z00bus-ccert-201305-13496
for an example.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-23 15:57:32 +02:00
David Henningsson 861a04ed15 ALSA: hda - Move the function "check_amp_caps" to hda_codec.c
The next patch will use it, so make it visible across modules.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-23 15:57:28 +02:00
David Henningsson a5062dee82 ALSA: hda - add explicit include of err.h
Since every caller of snd_hda_jack_detect_enable_callback needs to
use the macros from err.h, it makes sense to include it directly
from hda_jack.h.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-23 09:42:17 +02:00
Takashi Iwai 7639913f72 Merge branch 'topic/hda-jack-rework' into for-next
This is a merge of rework of HD-audio jack event handling code.
It extends the jack table to allow multiple callbacks.
2014-09-22 10:12:16 +02:00
Clemens Ladisch 4e9c58cb12 ALSA: oxygen: set fifo_size
Allow the driver to report the hardware FIFO size.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-22 08:57:01 +02:00
Harley Griggs 5ae0095d00 ALSA: virtuoso: add partial Xonar Xense support
This patch adds partial support for the Xonar Xense.

[trivial coding style fixes by tiwai]

Signed-off-by: Harley Griggs <hgriggs@posteo.co.uk>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-22 08:55:15 +02:00
Huacai Chen 8245b36345 ALSA: hda - Add fixup model name lookup for Lemote A1205
Lemote A1004 is already added in commit a2dd933d01 (ALSA: hda - Add
fixup name lookup for CX5051 and 5066 codecs), but Lemote A1205 has
missing.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: <stable@vger.kernel.org> # 3.15+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-19 09:14:40 +02:00
Rasmus Villemoes 8bb1ffdf76 ALSA: hda - Replace strnicmp with strncasecmp
The kernel used to contain two functions for length-delimited,
case-insensitive string comparison, strnicmp with correct semantics
and a slightly buggy strncasecmp. The latter is the POSIX name, so
strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper
for the new strncasecmp to avoid breaking existing users.

To allow the compat wrapper strnicmp to be removed at some point in
the future, and to avoid the extra indirection cost, do
s/strnicmp/strncasecmp/g.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-17 07:53:30 +02:00
Takashi Iwai f8fb117034 ALSA: hda - Use standard hda_jack infrastructure for CA0132 driver
For its headphone, mic and DSP responses, we can use the standard
hda_jack infrastructure in CA0132 driver, too.  The only point to
handle carefully is the delayed headphone jack handling.  It tries to
react after a certain delay.  Here we use the existing block_report
flag in hda_jack_tbl (that was implemented for HDMI).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-16 17:25:02 +02:00