Commit Graph

17740 Commits

Author SHA1 Message Date
Charles Keepax 749d32237b ALSA: compress: Pass through return value of open ops callback
The snd_compr_open function would always return 0 even if the compressed
ops open function failed, obviously this is incorrect. Looks like this
was introduced by a small typo in:

commit a0830dbd4e
ALSA: Add a reference counter to card instance

This patch returns the value from the compressed op as it should.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-19 15:46:24 +01:00
Clemens Ladisch 305564413c ALSA: oxygen: Xonar DG(X): fix Stereo Upmixing regression
The code introduced in commit 1f91ecc14d ("ALSA: oxygen: modify
adjust_dg_dac_routing function") accidentally disregarded the old value
of the playback routing register, so it broke the "Stereo Upmixing"
mixer control.

The unmuted parts of the channel routing are the same for all settings
of the output destination, so it suffices to revert that part of the
patch.

Fixes: 1f91ecc14d ('ALSA: oxygen: modify adjust_dg_dac_routing function')
Tested-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-18 09:51:58 +01:00
Takashi Iwai 5e3a227a64 ASoC: Fixes for v3.14
A few things here:
  - Avoid memory leaks in error cases with DPCM, this code has never been
    that well tested in mainline due to the lack of mainline drivers but
    we now have one queued for the merge window!
  - Fix the N810 audio driver to load when booted with DT since the
    platform was converted to DT during the merge window.
  - Fixes for initialisation of some MFD drivers that are probably unused
    in mainline
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTHgKsAAoJELSic+t+oim9JJkQAJOQz8x2BzpaQQfsnXuwNXwv
 ShBeqGNcv66KtqcKDFHumL4k2fkewuwdsm3Nc/orUD3JI3mywdKStQH2/N9TAC6v
 KzSufl4Xs6ByyeayxZSZTf7wEbSvqxT75dnmzso6YPRV7sPK/cdRtFoRFXTtJqB7
 ixIRzfnatFvBhZVCgeGkS8WXzAFteXJF6Y90m+qNBJfgwO09gW4Gj2C6CW2kYfBm
 3m+JGjGN8pAsvS3JVPAIDdyswxK0BUzDbRjsfXr+SvdbXaemmYhnRWeW4FLrv6Q3
 DakMb/OlUJF3kq+9G6q1wMsieeIfErXwHs6SSurSHwg3+KJljYnZka9Vlh8dU/44
 CrxMG/FS6RjZRLMq8090/ho59uQ2Qh79Qn2PTM5nZ5TmMDMTxw1xXl95BuGsZ3wd
 5lPoP35LBFuOzxLuQs2Uz0p65uN3VETMgSW7FAOEpdh4SxHBG9veWjkrbvXvdtEd
 9pUH3k4O9nX7KOJsGWreBprTRZQuw9REiZ36tVb1Qe2TSPmkbTzHGhNcezdlLifm
 UWMIG4bR1lnKWMpQTd35ErzniJSyi8fJ55gbEm4ovq1FWHuueURPRD5OFAbHLLyR
 FRxq9UFKGenzcsDksqU2gef7LKhauAcoLPiXXswL1qaZz/sTgmoqV63pZuxBiA+p
 Avd3Dy1u5xZ4IM0B+Kr0
 =2H5y
 -----END PGP SIGNATURE-----

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

ASoC: Fixes for v3.14

A few things here:
 - Avoid memory leaks in error cases with DPCM, this code has never been
   that well tested in mainline due to the lack of mainline drivers but
   we now have one queued for the merge window!
 - Fix the N810 audio driver to load when booted with DT since the
   platform was converted to DT during the merge window.
 - Fixes for initialisation of some MFD drivers that are probably unused
   in mainline
2014-03-11 07:50:33 +01:00
Mark Brown 7f35afd44b Merge remote-tracking branches 'asoc/fix/88pm860', 'asoc/fix/omap' and 'asoc/fix/si476x' into asoc-linus 2014-03-10 11:30:56 +00:00
Mark Brown b25b1b6d72 Merge remote-tracking branch 'asoc/fix/pcm' into asoc-linus 2014-03-10 11:30:55 +00:00
Lars-Peter Clausen 8eeb5c1513 ASoC: 88pm860: Fix IO setup
The 88pm860 is a MFD device and the CODEC driver is using the regmap struct of
the parent device, hence automatic IO setup will not work and we need to
manually call snd_soc_codec_set_cache_io(). The issue was introduced in commit
f9ded3b2e7 ("ASoC: 88pm860x: Use regmap for I/O").

Fixes: f9ded3b2e7 ("ASoC: 88pm860x: Use regmap for I/O").
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-03-10 11:27:06 +00:00
Lars-Peter Clausen 58d4d3c976 ASoC: si476x: Fix IO setup
The si476x is a MFD device and the CODEC driver is using the regmap struct of
the parent device, hence automatic IO setup will not work and we need to
manually call snd_soc_codec_set_cache_io(). The issue was introduced commit
d6173df35f ("ASoC: si476x: Remove custom register I/O implementation")

Fixes: d6173df35f ("ASoC: si476x: Remove custom register I/O implementation")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-03-10 11:24:59 +00:00
Takashi Iwai 9b745ab897 ALSA: hda - Fix loud click noise with IdeaPad 410Y
Lenovo IdeaPad 410Y with ALC282 codec makes loud click noises at boot
and shutdown.  Also, it wrongly misdetects the acpi_thinkpad hook.
This patch adds a device-specific fixup for disabling the shutup
callback that is the cause of the click noise and also avoiding the
thinpad_helper calls.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=71511
Reported-and-tested-by: Guilherme Amadio <guilherme.amadio@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-07 08:37:19 +01:00
Takashi Iwai e805ca8b0a ALSA: usb-audio: Add quirk for Logitech Webcam C500
Logitech C500 (046d:0807) needs the same workaround like other
Logitech Webcams.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-05 12:37:15 +01:00
Takashi Iwai f3e9b59cb9 ALSA: hda - Use analog beep for Thinkpads with AD1984 codecs
For making the driver behavior compatible with the earlier kernels,
use the analog beep in the loopback path instead of the digital beep.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-05 12:00:29 +01:00
Takashi Iwai c5eda4c1bf ALSA: hda - Add missing loopback merge path for AD1884/1984 codecs
The mixer widget (NID 0x20) of AD1884 and AD1984 codecs isn't
connected directly to the actual I/O paths but only via another mixer
widget (NID 0x21).  We need a similar fix as we did for AD1882.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-05 11:52:24 +01:00
Patrick Lai e4ad1accb2 ASoC: pcm: free path list before exiting from error conditions
dpcm_path_get() allocates dynamic memory to hold path list.
Corresponding dpcm_path_put() must be called to free the memory.
dpcm_path_put() is not called under several error conditions.
This leads to memory leak.

Signed-off-by: Patrick Lai <plai@codeaurora.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-03-05 11:40:39 +08:00
Hui Wang 3b44675226 ALSA: hda - add automute fix for another dell AIO model
When plugging a headphone or headset, lots of noise is heard from
internal speaker, after changing the automute via amp instead of
pinctl, the noise disappears.

BugLink: https://bugs.launchpad.net/bugs/1268468
Cc: David Henningsson <david.henningsson@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-04 10:25:25 +01:00
Aaro Koskinen ea2787f350 ASoC: n810: fix init with DT boot
Since 3.14-rc1 only DT boot has been supported on N810, so this
file fails to init. Make a minimal fix to retain functionality.
This file should be properly converted to DT in longer term.

There seems to be still other unresolved issues with N810 audio support,
but this patch is needed at minimum as otherwise the machine driver
probing would completely fail.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-04 12:28:58 +08:00
Marius Knaust a6b92b6650 ALSA: hda - Added inverted digital-mic handling for Acer TravelMate 8371
Signed-off-by: Marius Knaust <marius.knaust@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-03 09:55:43 +01:00
Takashi Iwai 997e7547ab ASoC: Updates for v3.14
A few more driver specific bug fixes, all driver specific things that
 only affect users of those devices.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTDyNMAAoJELSic+t+oim9ar0P/2J7YHzqD/gs9SR4ufqr2JK9
 yudP5Stt81np6IZwJHJTF3n33RMXTanAdaFr5usJn0Mn8THuMzL6vCOr9zhoEOxu
 j3HDvR6rLnVQ9N0Cw9L7uM+goQzbw3N/rAfyUd6UckT1raKCErtLRZvvb7BV9FLX
 gu3K3b4w7LtTYqoFPPGpxjTENwNkX5rNWD5egDVnaiL9maAoCUal9HtznDSLu0pa
 uo8ggJRXEQYXAQ1rpEvSKwwYrZ2fQ3IxTMi3ucm9KxGvO3xyK/aXt32yp0qH5Poz
 v3FWDbXU8DsVYFXlRNrAIiAuMERBCsZQHismp3mt/yn+IOvcJHNVeRSJbIROddRr
 TCU7vo/OoBzsN5BJ4McoHtmfJXKaN+xY5yJJ7xczBcYPcfQlIXiXZbSJC8WNFVet
 MlNcvqpVzo9BIXwrGDbPofUBiruyOcbXg79QW1xWfR122BNoF2Ut+dKfXsoXfW5Y
 oETCw5oMO4dOifLvWp+0q0GXOG0EK1fqiHoHxhU/fksr/WQeJS7bplixXpPZoiqV
 PC6RKnFEeMHMdFmPyo7kQ94KVn4uQ/SomL+MQUIi+7+e2iC0vqql2A5kmE9iO+dS
 V7KuVgwcQ3QkIHEVeHKwKH3ETsKB7yktqlnqysPgwAf8fNKeokNk7eALsxkeSkt3
 b00TyEOk9oRYPlhmpcTd
 =GL3V
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.14-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v3.14

A few more driver specific bug fixes, all driver specific things that
only affect users of those devices.
2014-02-27 12:46:25 +01:00
Mark Brown 23308e8820 Merge remote-tracking branch 'asoc/fix/wm8958' into asoc-linus 2014-02-27 20:26:10 +09:00
Mark Brown 2f23db13df Merge remote-tracking branches 'asoc/fix/da732x' and 'asoc/fix/sta32x' into asoc-linus 2014-02-27 20:26:08 +09:00
Takashi Iwai b3619b288b ASoC: sta32x: Fix wrong enum for limiter2 release rate
There is a typo in the Limiter2 Release Rate control, a wrong enum for
Limiter1 is assigned.  It must point to Limiter2.
Spotted by a compile warning:

In file included from sound/soc/codecs/sta32x.c:34:0:
sound/soc/codecs/sta32x.c:223:29: warning: ‘sta32x_limiter2_release_rate_enum’ defined but not used [-Wunused-variable]
 static SOC_ENUM_SINGLE_DECL(sta32x_limiter2_release_rate_enum,
                             ^
include/sound/soc.h:275:18: note: in definition of macro ‘SOC_ENUM_DOUBLE_DECL’
  struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \
                  ^
sound/soc/codecs/sta32x.c:223:8: note: in expansion of macro ‘SOC_ENUM_SINGLE_DECL’
 static SOC_ENUM_SINGLE_DECL(sta32x_limiter2_release_rate_enum,
        ^

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: <stable@vger.kernel.org>
2014-02-27 16:53:50 +09:00
Takashi Iwai e2755cf9a4 ASoC: Fixes for v3.14
A somewhat large set of fixes here due to the identification of some
 systematic problems with hard to use APIs in the subsystem.  Takashi did
 a lot of work to address the enumeration API which uncovered a number of
 off by one bugs caused by confusing APIs while Charles addressed issues
 in the locking around DAPM.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTCXkuAAoJELSic+t+oim99LEP/3o0MTeminJkA0ks+edRN32I
 zlbPd1iv38Rh20J85zJ8lHhZlkDVPpwYVEDziCClfG3QbWiwh18HEreOhi5xswxi
 qSIk+4chXvBpdWaopLq+MEZSEqFLaHDeWPifzNs8tjQ2F8+RPZ5aOtmeBrwFQZVR
 fJmuJ8KnOvjcH8WGNKIepZENqNIU7NuwMmzB7mHwyANKuan30u9Vx5r7OZBEkA1h
 n6vNa48i2HKrdFwajm7Y/o8s5Qrnseiz6NepaO4hTHQhlFhsU9mjCeYvmzhvc1Jv
 NAC3x2yUIrff95IwzMQi/jwJHJN+VXIqvsp1MWNm4rOucZ5kxw+dtFmmXtvsedI1
 HO1gWPqvsYENs5L4cGbi1An/T7vSWOjsbs/2QwRRqduRHVJxnnoADswoQG2AGhOy
 z1uJsebt72eAsoCxrPmaysa4irNwkDLwpFEjTpEGpgWo3j5d+UfEUScc/1B3ia7g
 a/Oq9q/Q71ogdKSrMpYc66eK7y1XGF2XZNl4x3g/ZwswibM4aIwBr6ZekpoPPOYq
 KT3zEecKJ+lbPxl2rUQgm9ivAuC1XKJoBRLRgHXGtzZI54SFUkFD/dVL6GFfR6bS
 V8RHeGqOmoD/w6WpfXC4w9yhfNhJPbOKOaSFUdCyU5D2bgb7AOcwZOXRavXtJwJP
 //gsmzui+ikt4scli8a/
 =Ty2j
 -----END PGP SIGNATURE-----

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

ASoC: Fixes for v3.14

A somewhat large set of fixes here due to the identification of some
systematic problems with hard to use APIs in the subsystem.  Takashi did
a lot of work to address the enumeration API which uncovered a number of
off by one bugs caused by confusing APIs while Charles addressed issues
in the locking around DAPM.
2014-02-27 07:16:15 +01:00
Mark Brown 7530682024 ASoC: da732x: Mark DC offset control registers volatile
The driver reads from the DC offset control registers during callibration
but since the registers are marked as volatile and there is a register
cache the values will not be read from the hardware after the first reading
rendering the callibration ineffective.

It appears that the driver was originally written for the ASoC level
register I/O code but converted to regmap prior to merge and this issue
was missed during the conversion as the framework level volatile register
functionality was not being used.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Cc: stable@vger.kernel.org
2014-02-26 20:30:36 +09:00
Kailang Yang fce0a0c726 ALSA: hda/realtek - Add more entry for enable HP mute led
I lost this SSID. Add it into the fixup table.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-26 10:05:56 +01:00
Takashi Iwai 37c367ecdb ALSA: hda - Add a fixup for HP Folio 13 mute LED
HP Folio 13 may have a broken BIOS that doesn't set up the mute LED
GPIO properly, and the driver guesses it wrongly, too.  Add a new
fixup entry for setting the GPIO pin statically for this laptop.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70991
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-25 07:27:36 +01:00
Lars-Peter Clausen 548da08fc1 ASoC: wm8958-dsp: Fix firmware block loading
The codec->control_data contains a pointer to the device's regmap struct. But
wm8994_bulk_write() expects a pointer to the parent wm8998 device.

The issue was introduced in commit d9a7666f ("ASoC: Remove ASoC-specific
WM8994 I/O code").

Fixes: d9a7666f ("ASoC: Remove ASoC-specific WM8994 I/O code")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-02-25 13:39:36 +09:00
Mark Brown 57374bb491 Merge remote-tracking branches 'asoc/fix/sta32x', 'asoc/fix/wm8400', 'asoc/fix/wm8770', 'asoc/fix/wm8900' and 'asoc/fix/wm8994' into asoc-linus 2014-02-23 12:20:34 +09:00
Mark Brown d853c0ccb3 Merge remote-tracking branches 'asoc/fix/ad1980' and 'asoc/fix/isabelle' into asoc-linus 2014-02-23 12:20:32 +09:00
Mark Brown 45d39cbf00 Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus 2014-02-23 12:20:32 +09:00
Lars-Peter Clausen 70ff00f82a ASoC: sta32x: Fix cache sync
codec->control_data contains a pointer to the regmap struct of the device, not
to the device private data. Use snd_soc_codec_get_drvdata() instead.

The issue was introduced in commit 29fdf4fbbe ("ASoC: sta32x: Convert to
regmap").

Fixes: 29fdf4fbbe (ASoC: sta32x: Convert to regmap)
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-02-23 10:48:55 +09:00
Kailang Yang c60666bd22 ALSA: hda/realtek - Add more entry for enable HP mute led
More HP machine need mute led support.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-21 12:04:44 +01:00
Charles Keepax 1139110064 ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions
The snd_soc_dapm_xxxx_pin all require the dapm_mutex to be held when
they are called as they edit the dirty list, however very few of the
callers do so.

This patch adds unlocked versions of all the functions replacing the
existing implementations with one that holds the lock internally. We
also fix up the places where the lock was actually held on the caller
side.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-02-20 18:40:07 +09:00
Hui Wang 1de7ca5e84 ALSA: hda - Enable front audio jacks on one HP desktop model
The front headphone and mic jackes on a HP desktop model (Vendor Id:
0x111d76c7 Subsystem Id: 0x103c2b17) can not work, the codec on this
machine has 8 physical ports, 6 of them are routed to rear jackes
and all of them work very well, while the remaining 2 ports are
routed to front headphone and mic jackes, but the corresponding
pin complex node are not defined correctly.

After apply this fix, the front audio jackes can work very well.

[trivial fix of enum definition by tiwai]

BugLink: https://bugs.launchpad.net/bugs/1282369
Cc: David Henningsson <david.henningsson@canonical.com>
Tested-by: Gerald Yang <gerald.yang@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-20 08:14:57 +01:00
Takashi Iwai f31f40be8f ASoC: Fixes for v3.14
A few fixes, all driver speccific ones.  The DaVinci ones aren't as
 clear as they should be from the subject lines on the commits but they
 fix issues which will prevent correct operation in some use cases and
 only affect that particular driver so are reasonably safe.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTBDGxAAoJELSic+t+oim95ZoP/0YCVAn+Eia9ohs6o+8bEQWb
 UXj6PxGlwk0z7kPsTLbffCqPlktTlrJPIpL4JPLkWPxUrS8Q/Lc1jSBS/wIfeQXs
 u+kjn/RR91p8yLRDaVpgp2adoh18d9YU9hYuCcoDu+gLOCzTdLOXV3IriN67Sp3p
 WZIORNKPaRH4uHQdtcY+ajdwduWi5fd4cF56FOS2xnq0dxJ07rFpLmdm6HaKxOB0
 J9/F1h+asgdBIYmkg/+Kex1MO0OvcfCUSsYNbybXqesjfdicEHIco4IvegqBYq3F
 wwu5K/bJQUx4Ylah3JvNCRDlzMLSTD709hcOZsEoZmrB6cWwakrJAkBXN2N6AHUt
 CjzKZ+JLKovjttZ/h86MtvulQwH+T6ouVJ0CUcgNoD+pGlytl30DGB9Cn2j33jKr
 ix/LvFF12wES1G8poAHvskuGWONyfefFq7Ri+t+W5blitSUVVYO+5EwZC7BR0GNt
 bhoFxeTC2nO7tYkTTzoNEFrU/X+zy4m8dQfkaSDYnaDTtSURlOwa24qmCbI+FSTo
 Ti7T/NtyWzDtFbDhxxhVE8HMR1BO9X2+16zAEN4SuWotYXzab7xbh3wjOQtWa5HL
 toEBBY3ZQ5VFkCxe35dAXMPVp1ToQh7dTVohGE4wg7yPiorZ44ehNsSTMNaItjh5
 /d2rx9Su3+X2R2xY+UqK
 =Kgdb
 -----END PGP SIGNATURE-----

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

ASoC: Fixes for v3.14

A few fixes, all driver speccific ones.  The DaVinci ones aren't as
clear as they should be from the subject lines on the commits but they
fix issues which will prevent correct operation in some use cases and
only affect that particular driver so are reasonably safe.
2014-02-20 07:50:32 +01:00
Takashi Iwai 898b48eb88 ASoC: wm8400: Fix the wrong number of enum items
wm8400 codec driver has a few places wrongly defining the number of
enum items.

Use SOC_ENUM_SINGLE_DECL() macro and they are automatically fixed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 11:07:53 +09:00
Takashi Iwai cdbb492557 ASoC: isabelle: Fix the wrong number of items in enum ctls
isabelle codec driver has a few places wrongly defining the number of
enum items.

Use SOC_ENUM_SINGLE_DECL() macro and they are automatically fixed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 11:06:37 +09:00
Takashi Iwai 901bb6c55d ASoC: ad1980: Fix wrong number of items for capture source
The number of capture sources is 8, not 7.
Use SOC_ENUM_DOUBLE_DECL() macro and it's automatically fixed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 11:01:26 +09:00
Takashi Iwai e61a35b798 ASoC: wm8994: Fix the wrong number of enum items
wm8994 codec driver has a few places wrongly defining the number of
enum items.

Use SOC_ENUM_SINGLE_DECL() macro and they are automatically fixed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 10:33:33 +09:00
Takashi Iwai 9d16631436 ASoC: wm8900: Fix the wrong number of enum items
wm8900 codec driver has a few places wrongly defining the number of
enum items.

Use SOC_ENUM_SINGLE_DECL() macro and they are automatically fixed.

Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-20 10:26:00 +09:00
Takashi Iwai 7a6c0a58dc ASoC: wm8770: Fix wrong number of enum items
wm8770 codec driver defines ain_enum with a wrong number of items.

Use SOC_ENUM_DOUBLE_DECL() macro and it's automatically fixed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-02-20 10:23:20 +09:00
Takashi Iwai 025c3fa925 ASoC: sta32x: Fix array access overflow
Preset EQ enum of sta32x codec driver declares too many number of
items and it may lead to the access over the actual array size.

Use SOC_ENUM_SINGLE_DECL() helper and it's automatically fixed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-02-20 01:46:05 +09:00
Hsin-Yu Chao 13c12dbe3a ALSA: hda/ca0132 - Fix recording from mode id 0x8
Incorrect ADC is picked in ca0132_capture_pcm_prepare(),
where it assumes multiple streams while there is one stream
per ADC. Note that ca0132_capture_pcm_cleanup() already does
the right thing.

The Chromebook Pixel has a microphone under the keyboard that
is attached to node id 0x8. Before this fix, recording would
always go to the main internal mic (node id 0x7).

Signed-off-by: Hsin-Yu Chao <hychao@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-19 07:50:34 +01:00
Hsin-Yu Chao 28fba95087 ALSA: hda/ca0132 - setup/cleanup streams
When a HDMI stream is opened with the same stream tag
as a following opened stream to ca0132, audio will be
heard from two ports simultaneously.
Fix this issue by change to use snd_hda_codec_setup_stream
and snd_hda_codec_cleanup_stream instead, so that an
inactive stream can be marked as 'dirty' when found
with a conflict stream tag, and then get purified.

Signed-off-by: Hsin-Yu Chao <hychao@chromium.org>
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-19 07:50:16 +01:00
Charles Keepax 30686c3506 ASoC: dapm: Correct regulator bypass error messages
The error messages for bypassing/unbypassing a regulator appear to be
swapped round, this patch corrects these.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-19 13:30:02 +09:00
Mark Brown 895be5b31e Merge remote-tracking branch 'asoc/fix/wm8993' into asoc-linus 2014-02-19 13:13:58 +09:00
Mark Brown d05d780340 Merge remote-tracking branches 'asoc/fix/blackfin', 'asoc/fix/da9055', 'asoc/fix/davinci', 'asoc/fix/fsl', 'asoc/fix/fsl-esai', 'asoc/fix/max98090', 'asoc/fix/rt5640', 'asoc/fix/samsung' and 'asoc/fix/txx9aclc-ac97' into asoc-linus 2014-02-19 13:13:52 +09:00
Hui Wang 4913e0bf23 ALSA: hda - add headset mic detect quirks for two Dell laptops
When we plug a 3-ring headset on the Dell machines (Vendor ID:
0x10ec0255, Subsystem ID: 0x10280657; Vendor ID: 0x10ec0255,
Subsystem ID: 0x1028065f), the headset mic can't be
detected, after apply this patch, the headset mic can work well.

BugLink: https://bugs.launchpad.net/bugs/1260303
Cc: David Henningsson <david.henningsson@canonical.com>
Tested-by: Cyrus Lien <cyrus.lien@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-18 07:59:57 +01:00
Clemens Ladisch 624aef494f ALSA: usb-audio: work around KEF X300A firmware bug
When the driver tries to access Function Unit 10, the KEF X300A
speakers' firmware apparently locks up, making even PCM streaming
impossible.  Work around this by ignoring this FU.

Cc: <stable@vger.kernel.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-17 10:11:54 +01:00
Stephen Warren e126a646f7 ASoC: max98090: make REVISION_ID readable
The REVISION_ID register is not currently marked readable. snd_soc_read()
refuses to read the register, and hence probe() fails.

Fixes: d4807ad2c4 ("regmap: Check readable regs in _regmap_read")
[exposed the bug, by checking for readability]
Fixes: 685e42154d ("ASoC: Replace max98090 Device Driver")
[left out this register from the readable list]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-16 09:09:20 +08:00
Alexander Shiyan 9febd494d1 ASoC: txx9aclc_ac97: Fix kernel crash on probe
This patch fixes a crash caused by commit 3bed3344c8
(ASoC: txx9aclc_ac97: Convert to devm_ioremap_resource()).
This is an attempt to assign "drvdata->base" while memory
for "drvdata" is not already allocated.

Fixes: 3bed3344c8 (ASoC: txx9aclc_ac97: Convert to devm_ioremap_resource())
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-02-16 08:36:40 +08:00
Dylan Reid c42c8922c4 ASoC: max98090: sync regcache on entering STANDBY
Sync regcache when entering STANDBY from OFF.  ON isn't entered with
OFF as the current state, so the registers were not being re-synced
after suspend/resume.

The 98088 and 98095 already call regcache_sync from STANDBY.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-02-12 19:55:31 +00:00
Martin Kepplinger 2078600b1f ALSA: Revert "ALSA: hda/realtek - Avoid invalid COEFs for ALC271X"
This reverts commit d3c56568f4.

The reverted commit breaks audio through headphone line out on
the Acer TravelMate B113 (Type1Sku0) Notebook, my main work
machine. I don't know much about it but this fixes my problem.
Bisected and tested.

Fixes: d3c56568f4 ('ALSA: hda/realtek - Avoid invalid COEFs for ALC271X')
Cc: <stable@vger.kernel.org>
Tested-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-12 17:37:46 +01:00
Lars-Peter Clausen e3947ecb4e ASoC: blackfin: Fix machine driver Kconfig dependencies
Since the machine driver selects the CODEC driver we need to make sure that the
machine driver is only selectable if the CODEC driver can be build. This avoids
build errors under some configurations (which typically only result from
randconfig).

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-12 16:16:38 +00:00
Adam Thomson 07b0e5b102 ASoC: da9055: Fix device registration of PMIC and CODEC devices
Currently the I2C device Ids conflict for the MFD and CODEC so
cannot be both instantiated on one platform. This patch updates
the Ids and names to make them unique from each other.

It should be noted that the I2C addresses for both PMIC and CODEC
are modifiable so instantiation of the two are kept as separate
devices, rather than instantiating the CODEC from the MFD code.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-02-10 13:43:52 +00:00
Xiubo Li 236014ac7a ASoC: fsl-esai: fix ESAI TDM slot setting
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Acked-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-10 13:39:18 +00:00
Shawn Guo 47cf84e17e ASoC: fsl: fix pm support of machine drivers
The commit 1abe729 (ASoC: fsl: Add missing pm to current machine
drivers) enables pm support for a few IMX machine drivers.  But it does
not update dev drvdata to be the pointer to 'card'.  This causes the
kernel dump below in system suspend, because snd_soc_suspend() expects
that the dev drvdata points to 'card', while it still points to the
private data of machine driver.

This patch fixes imx-sgtl5000 and imx-wm8962 by attaching 'card' to dev
drvdata and private data to card drvdata.  For imx-mc13783, I simply
revert the pm change because it must be broken for the same reason and
I don't have hardware to test pm enabling code.

$ echo mem > /sys/power/state
PM: Syncing filesystems ... done.
PM: Preparing system for mem sleep
mmc1: card e624 removed
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
PM: Entering mem sleep
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
CPU: 0 PID: 1861 Comm: bash Not tainted 3.14.0-rc1+ #1648
Backtrace:
[<80012144>] (dump_backtrace) from [<800122e4>] (show_stack+0x18/0x1c)
 r6:8079c77c r5:00000c5a r4:00000000 r3:00000000
[<800122cc>] (show_stack) from [<80637ac0>] (dump_stack+0x78/0x94)
[<80637a48>] (dump_stack) from [<80028918>] (warn_slowpath_common+0x6c/0x8c)
 r4:bdb21c38 r3:be62df00
[<800288ac>] (warn_slowpath_common) from [<800289dc>] (warn_slowpath_fmt+0x38/0x40)
 r8:be62e3a8 r7:bf122960 r6:00000005 r5:00000000 r4:00000000
[<800289a8>] (warn_slowpath_fmt) from [<8006518c>] (__lock_acquire+0x1ae0/0x1ce0)
 r3:8079d598 r2:80799e70
[<800636ac>] (__lock_acquire) from [<80065894>] (lock_acquire+0x68/0x7c)
 r10:bdb20000 r9:be62df00 r8:00000000 r7:00000000 r6:60000013 r5:bdb20000
 r4:00000000
[<8006582c>] (lock_acquire) from [<8063c938>] (mutex_lock_nested+0x5c/0x3b8)
 r7:00000000 r6:80dfc78c r5:804be444 r4:bf122928
[<8063c8dc>] (mutex_lock_nested) from [<804be444>] (snd_soc_suspend+0x34/0x42c)
 r10:00000000 r9:00000000 r8:00000000 r7:bf1c4444 r6:bf1c4410 r5:be978150
 r4:be978010
[<804be410>] (snd_soc_suspend) from [<8034392c>] (platform_pm_suspend+0x34/0x64)
 r10:00000000 r8:00000000 r7:bf1c4444 r6:bf1c4410 r5:803438f8 r4:bf1c4410
[<803438f8>] (platform_pm_suspend) from [<80348e18>] (dpm_run_callback.isra.7+0x34/0x6c)
[<80348de4>] (dpm_run_callback.isra.7) from [<80349354>] (__device_suspend+0x10c/0x220)
 r9:808dd974 r8:808c4a5c r6:00000002 r5:80e5001c r4:bf1c4410
[<80349248>] (__device_suspend) from [<8034a338>] (dpm_suspend+0x60/0x220)
 r7:bf1c4410 r6:808dd90c r5:80e5001c r4:bf1c44c0
[<8034a2d8>] (dpm_suspend) from [<8034a790>] (dpm_suspend_start+0x60/0x68)
 r10:8079a818 r9:00000000 r8:00000004 r7:80dfbe90 r6:80641eec r5:00000000
 r4:00000002
[<8034a730>] (dpm_suspend_start) from [<8006a788>] (suspend_devices_and_enter+0x74/0x318)
 r4:00000003 r3:80dfbe98
[<8006a714>] (suspend_devices_and_enter) from [<8006abd8>] (pm_suspend+0x1ac/0x244)
 r10:8079a818 r8:00000004 r7:00000003 r6:80641eec r5:00000000 r4:00000003
[<8006aa2c>] (pm_suspend) from [<80069a4c>] (state_store+0x70/0xc0)
 r5:00000003 r4:bd85ea40
[<800699dc>] (state_store) from [<80294034>] (kobj_attr_store+0x1c/0x28)
 r10:beb9fe08 r8:00000000 r7:bdb21f78 r6:bd85ea40 r5:00000004 r4:beb9fe00
[<80294018>] (kobj_attr_store) from [<80140f90>] (sysfs_kf_write+0x54/0x58)
[<80140f3c>] (sysfs_kf_write) from [<8014474c>] (kernfs_fop_write+0xc4/0x160)
 r6:bd85ea40 r5:beb9fe00 r4:00000004 r3:80140f3c
[<80144688>] (kernfs_fop_write) from [<800dfa14>] (vfs_write+0xbc/0x184)
 r10:00000000 r9:00000000 r8:00000000 r7:bdb21f78 r6:00500c08 r5:00000004
 r4:be782600
[<800df958>] (vfs_write) from [<800dfe00>] (SyS_write+0x48/0x70)
 r10:00000000 r8:00000000 r7:00000004 r6:00500c08 r5:00000000 r4:be782600
[<800dfdb8>] (SyS_write) from [<8000e800>] (ret_fast_syscall+0x0/0x48)
 r9:bdb20000 r8:8000e9c4 r7:00000004 r6:00500c08 r5:00000004 r4:76eb65e0

Fixes: 1abe729 (ASoC: fsl: Add missing pm to current machine drivers)
Cc: stable@vger.kernel.org
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-10 13:18:37 +00:00
Takashi Iwai ef8e39b51f ALSA: hda - Fix undefined symbol due to builtin/module mixup
Even after the fix for leftover kconfig handling (commit f8f1becf),
the current code still doesn't handle properly the builtin/module
mixup case between the core snd-hda-codec and other codec drivers.
For example, when CONFIG_SND_HDA_INTEL=y and
CONFIG_SND_HDA_CODEC_HDMI=m, it'll end up with an unresolved symbol
snd_hda_parse_hdmi_codec.  This patch fixes the issue.

Now codec->parser points to the parser object *only* when a module
(either generic or HDMI parser) is loaded and bound.  When a builtin
symbol is used, codec->parser still points to NULL.  This is the
difference from the previous versions.

Fixes: f8f1becfa4 ('ALSA: hda - Fix leftover ifdef checks after modularization')
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-10 11:50:01 +01:00
Jarkko Nikula b31b2b6d5d ASoC: rt5640: Add ACPI ID for Intel Baytrail
Realtek RT5640 uses ACPI ID "10EC5640" for Intel Baytrail platforms.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-02-07 12:29:17 +00:00
Takashi Iwai f88abaa0d0 ALSA: hda - Fix mic capture on Sony VAIO Pro 11
The very same fixup is needed to make the mic on Sony VAIO Pro 11
working as well as VAIO Pro 13 model.

Reported-and-tested-by: Hendrik-Jan Heins <hjheins@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-07 12:13:26 +01:00
David Henningsson f47e5dc464 ALSA: hda - Add a headset quirk for Dell XPS 13
This quirk is needed for the headset microphone to work.

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

Cc: stable@vger.kernel.org (3.10+)
Reported-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-07 12:13:25 +01:00
Takashi Iwai 7fe307117d ALSA: hda - Fix inconsistent Mic mute LED
The current code for controlling mic mute LED in patch_sigmatel.c
blindly assumes that there is a single capture switch.  But, there can
be multiple multiple ones, and each of them flips the state, ended up
in an inconsistent state.

For fixing this problem, this patch adds kcontrol to be passed to the
hook function so that the callee can check which switch is being
accessed.  In stac_capture_led_hook(), the state is checked as a
bitmask, and turns on the LED when all capture switches are off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-07 12:13:25 +01:00
Takashi Iwai f8f1becfa4 ALSA: hda - Fix leftover ifdef checks after modularization
Since the commit [595fe1b702c3: ALSA: hda - Make
CONFIG_SND_HDA_CODEC_* tristate], the kconfig variables for the
generic parser and codec drivers can be "m" instead of boolean, but
some codes are left unchanged to check only #ifdef
CONFIG_SND_HDA_CODEC_XXX, which is no longer true for modules.
This patch fixes them by replacing with IS_ENABLED() macros.

Fixes: 595fe1b702 ('ALSA: hda - Make CONFIG_SND_HDA_CODEC_* tristate')
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70161
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-07 12:13:25 +01:00
Takashi Iwai 276ab336b4 ALSA: hda - Improve loopback path lookups for AD1983
AD1983 has flexible loopback routes and the generic parser would take
wrong path confusingly instead of taking individual paths via NID 0x0c
and 0x0d.  For avoiding it, limit the connections at these widgets so
that the parser can think more straightforwardly.  This fixes the
regression of the missing line-in loopback on Dell machine.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70011
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-05 08:49:41 +01:00
Takashi Iwai c20f31ec42 ALSA: hda - Fix missing VREF setup for Mac Pro 1,1
Mac Pro 1,1 with ALC889A codec needs the VREF setup on NID 0x18 to
VREF50, in order to make the speaker working.  The same fixup was
already needed for MacBook Air 1,1, so we can reuse it.

Reported-by: Nicolai Beuermann <mail@nico-beuermann.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-05 07:38:07 +01:00
Takashi Iwai c7579fed1f ALSA: hda - Add missing mixer widget for AD1983
The mixer widget on AD1983 at NID 0x0e was missing in the commit
[f2f8be43c5c9: ALSA: hda - Add aamix NID to AD codecs].

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70011
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-05 07:30:50 +01:00
Takashi Iwai d3c56568f4 ALSA: hda/realtek - Avoid invalid COEFs for ALC271X
We've seen often problems after suspend/resume on Acer Aspire One
AO725 with ALC271X codec as reported in kernel bugzilla, and it turned
out that some COEFs doesn't work and triggers the codec communication
stall.

Since these magic COEF setups are specific to ALC269VB for some PLL
configurations, the machine works even without these manual
adjustment.  So, let's simply avoid applying them for ALC271X.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=52181
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-05 07:17:49 +01:00
Takashi Iwai 4528eb19b0 ALSA: hda - Fix silent output on Toshiba Satellite L40
Toshiba Satellite L40 with AD1986A codec requires the EAPD of NID 0x1b
to be constantly on, otherwise the output doesn't work.
Unlike most of other AD1986A machines, EAPD is correctly implemented
in HD-audio manner (that is, bit set = amp on), so we need to clear
the inv_eapd flag in the fixup, too.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=67481
Cc: <stable@vger.kernel.org> [v3.11+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-04 07:39:06 +01:00
Takashi Iwai 4fa71c1550 ALSA: usb-audio: Add missing kconfig dependecy
The commit 44dcbbb1cd introduced the usage of bitreverse helpers but
forgot to add the dependency.  This patch adds the selection for
CONFIG_BITREVERSE.

Fixes: 44dcbbb1cd ('ALSA: snd-usb: add support for bit-reversed byte formats')
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-03 09:42:45 +01:00
Linus Torvalds 14864a52cd sound fixes for 3.14-rc1
The big chunks here are the updates for oxygen driver for Xonar DG
 devices, which were slipped from the previous pull request.  They are
 device-specific and thus not too dangerous.
 
 Other than that, all patches are small bug fixes, mainly for Samsung
 build fixes, a few HD-audio enhancements, and other misc ASoC fixes.
 (And this time ASoC merge is less than Octopus, lucky seven :)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJS69k+AAoJEGwxgFQ9KSmk6pMQAIbo4mBrMzdkt7elEErpdpDj
 4P11/owXL+/gD+fTVXyTubvalXN9MATUWnHbLqi9qTYWx7u/RjnP32PQ0aMSyq1r
 PJq99Or+H+H2ui1dTsgIg2A8pYvbeuzU+Y7UcTusy9IolZNvKTNHVJRL79QQzNrp
 JTX220K4wLAjrl96fOtJ2gpABSej2kLdJ8Tj+YE7eMzySw+nS18nwoca2l3GPcR4
 qAyDQ0owgOWmBBaExSAgC9ck0l6NVSAba9r1ub156Szf0htmv5+pHqv3JJjKVTc/
 NmD/XVZxT7jEucPb6tAvmSfAqQBm97mX3nXVKQd3+QlH3pRI0pifS4ZOgRqJUZr/
 XZnM5lB17kd7XCBqnik+Nk9EmBRgF5ASRatVE+Mg469i9GBzqQOv0NTEsqL+Vhmb
 6tng5hBOV8o3v4/Z3uPVMtTEP+UYj+d8YseleNV5OI7dfjqQPZHWTeCllKl42Rra
 Ui5P1V1i1KD2jgiqbLR4XYmkMbXY31o5I6BvKb1iJ2jVn0igtrFpcD28Z+ufENLk
 /618pjpJH9WswwzYTAB1lijbM2Wuh7KF/UwsA02OyT4glwVYkMjEYQybpeQQ31sA
 vNiOLiy0epAw/8FBvg2nVl8n5EdFCiLlczqFhcabBEvO/RAqg4w9ipUBlR6OMo0+
 JQTwuvLLjyimHkQdUcmO
 =QB98
 -----END PGP SIGNATURE-----

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

Pull sound fixes from Takashi Iwai:
 "The big chunks here are the updates for oxygen driver for Xonar DG
  devices, which were slipped from the previous pull request.  They are
  device-specific and thus not too dangerous.

  Other than that, all patches are small bug fixes, mainly for Samsung
  build fixes, a few HD-audio enhancements, and other misc ASoC fixes.
  (And this time ASoC merge is less than Octopus, lucky seven :)"

* tag 'sound-fix-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (42 commits)
  ALSA: hda/hdmi - allow PIN_OUT to be dynamically enabled
  ALSA: hda - add headset mic detect quirks for another Dell laptop
  ALSA: oxygen: Xonar DG(X): cleanup and minor changes
  ALSA: oxygen: Xonar DG(X): modify high-pass filter control
  ALSA: oxygen: Xonar DG(X): modify input select functions
  ALSA: oxygen: Xonar DG(X): modify capture volume functions
  ALSA: oxygen: Xonar DG(X): use headphone volume control
  ALSA: oxygen: Xonar DG(X): modify playback output select
  ALSA: oxygen: Xonar DG(X): capture from I2S channel 1, not 2
  ALSA: oxygen: Xonar DG(X): move the mixer code into another file
  ALSA: oxygen: modify CS4245 register dumping function
  ALSA: oxygen: modify adjust_dg_dac_routing function
  ALSA: oxygen: Xonar DG(X): modify DAC/ADC parameters function
  ALSA: oxygen: Xonar DG(X): modify initialization functions
  ALSA: oxygen: Xonar DG(X): add new CS4245 SPI functions
  ALSA: oxygen: additional definitions for the Xonar DG/DGX card
  ALSA: oxygen: change description of the xonar_dg.c file
  ALSA: oxygen: export oxygen_update_dac_routing symbol
  ALSA: oxygen: add mute mask for the OXYGEN_PLAY_ROUTING register
  ALSA: oxygen: modify the SPI writing function
  ...
2014-01-31 15:38:09 -08:00
Stephen Warren 75fae117a5 ALSA: hda/hdmi - allow PIN_OUT to be dynamically enabled
Commit 384a48d715 "ALSA: hda: HDMI: Support codecs with fewer cvts
than pins" dynamically enabled each pin widget's PIN_OUT only when the
pin was actively in use. This was required on certain NVIDIA CODECs for
correct operation. Specifically, if multiple pin widgets each had their
mux input select the same audio converter widget and each pin widget had
PIN_OUT enabled, then only one of the pin widgets would actually receive
the audio, and often not the one the user wanted!

However, this apparently broke some Intel systems, and commit
6169b67361 "ALSA: hda - Always turn on pins for HDMI/DP" reverted the
dynamic setting of PIN_OUT. This in turn broke the afore-mentioned NVIDIA
CODECs.

This change supports either dynamic or static handling of PIN_OUT,
selected by a flag set up during CODEC initialization. This flag is
enabled for all recent NVIDIA GPUs.

Reported-by: Uosis <uosisl@gmail.com>
Cc: <stable@vger.kernel.org> # v3.13
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-31 17:57:02 +01:00
Peter Ujfalusi fb6d208d54 ASoC: davinci-evm: Add pm callbacks to platform driver
Set snd_soc_pm_ops for the pm ops.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-31 16:21:24 +00:00
Peter Ujfalusi 1d17a04ef2 ASoC: davinci-mcasp: Consolidate pm_runtime_get/put() use in the driver
The use of pm_runtime in trigger() callback is not correct and it will lead
to unbalanced power.usage_count.
The only place which might need to call pm_runtime is the set_fmt callback.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-31 16:19:19 +00:00
Peter Ujfalusi 2c56c4c27c ASoC: davinci-mcasp: Configure xxTDM, xxFMT and xxFMCT registers synchronously
These registers can be configured synchronously for playback and capture.
Furthermore when McASP is in master and sync mode the capture operation
needs the TX path to be configured in order to be able to provide the needed
clocks for the bus.
xxFMT and xxFMCT registers has been already configured for both TX and RX
other places in the driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-31 15:51:20 +00:00
Peter Ujfalusi 662ffae9ed ASoC: davinci-mcasp: Harmonize the sub hw_params function names
Instead of
davinci_hw_common_param - for common, I2S/DIT mode settings
davinci_hw_dit_param - for DIT protocol configuration
davinci_hw_param - for I2S (and compatible protocols)

Use the following names:
mcasp_common_hw_param, mcasp_dit_hw_param and mcasp_i2s_hw_param.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-31 15:51:20 +00:00
Sachin Kamat 25e7e34805 ASoC: samsung: Fix trivial typo
Changed Sat -> Say.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-30 11:42:36 +00:00
Sachin Kamat eaff64705d ASoC: samsung: Remove invalid dependencies
These symbols got eliminated when non-DT support for Exynos was
removed. Remove them.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-30 11:42:34 +00:00
Hui Wang 5e87d58071 ALSA: hda - add headset mic detect quirks for another Dell laptop
When we plug a 3-ring headset on the Dell machine (Vendor ID:
0x10ec0255, Subsystem ID: 0x1028064d), the headset mic can't be
detected, after apply this patch, the headset mic can work well.

BugLink: https://bugs.launchpad.net/bugs/1260303
Cc: David Henningsson <david.henningsson@canonical.com>
Tested-by: Doro Wu <fan-cheng.wu@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-30 12:21:30 +01:00
Takashi Iwai 77d531bfda Merge branch 'xonar-dg' of git://git.alsa-project.org/alsa-kprivate into for-next
This completes the hardware support for the Asus Xonar DG/DGX cards,
and makes them actually usable.

This is v4 of Roman's patch set with some small formatting changes.
2014-01-30 12:12:27 +01:00
Linus Torvalds ca2a650f3d Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dma updates from Vinod Koul:
 - new driver for BCM2835 used in R-pi
 - new driver for MOXA ART
 - dma_get_any_slave_channel API for DT based systems
 - minor fixes and updates spread acrooss driver

[ The fsl-ssi dual fifo mode support addition clashed badly with the
  other changes to fsl-ssi that came in through the sound merge.  I did
  a very rough cut at fixing up the conflict, but Nicolin Chen (author
  of both sides) will need to verify and check things ]

* 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (36 commits)
  dmaengine: mmp_pdma: fix mismerge
  dma: pl08x: Export pl08x_filter_id
  acpi-dma: align documentation with kernel-doc format
  dma: fix vchan_cookie_complete() debug print
  DMA: dmatest: extend the "device" module parameter to 32 characters
  drivers/dma: fix error return code
  dma: omap: Set debug level to debugging messages
  dmaengine: fix kernel-doc style typos for few comments
  dma: tegra: add support for Tegra148/124
  dma: dw: use %pad instead of casting dma_addr_t
  dma: dw: join split up messages
  dma: dw: fix style of multiline comment
  dmaengine: k3dma: fix sparse warnings
  dma: pl330: Use dma_get_slave_channel() in the of xlate callback
  dma: pl330: Differentiate between submitted and issued descriptors
  dmaengine: sirf: Add device_slave_caps interface
  DMA: Freescale: change BWC from 256 bytes to 1024 bytes
  dmaengine: Add MOXA ART DMA engine driver
  dmaengine: Add DMA_PRIVATE to BCM2835 driver
  dma: imx-sdma: Assign a default script number for ROM firmware cases
  ...
2014-01-29 20:27:23 -08:00
Roman Volkov 3f49a66f6c ALSA: oxygen: Xonar DG(X): cleanup and minor changes
Remove old SPI control functions, change anti-pop init
sequence, remove some garbage from structures. The 'Apply' functions
must be called at the mixer initialization, otherwise
mixer settings sometimes will not be applied at startup.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:53 +01:00
Roman Volkov fc114e9fba ALSA: oxygen: Xonar DG(X): modify high-pass filter control
Change the 'put' function of the high-pass filter control to use the new
SPI functions.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:52 +01:00
Roman Volkov 70e0d82d5e ALSA: oxygen: Xonar DG(X): modify input select functions
First of all, we should not touch the GPIOs. They are not
for selecting the capture source, but they seems just enable
the whole audio input curcuit. The 'put' function calls the
'apply' functions to change register values. Change the order
of capture sources.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:51 +01:00
Roman Volkov cf218b2ef3 ALSA: oxygen: Xonar DG(X): modify capture volume functions
Modify the input_vol_* functions to use the new SPI routines,
There is a new applying function that will be called when
the capture source changed.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:51 +01:00
Roman Volkov c754639a29 ALSA: oxygen: Xonar DG(X): use headphone volume control
I tried both variants: volume control and impedance selector.
In the first case one minus is that we can't change the
volume of multichannel output without additional software
volume control. However, I am using this variant for the
last three months and this seems good. All multichannel
speaker systems have internal amplifier with the
volume control included, but not all headphones have
this regulator. In the second case, my software volume
control does not save the value after reboot.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:50 +01:00
Roman Volkov 2809cb84d1 ALSA: oxygen: Xonar DG(X): modify playback output select
Change the order of elements in the output select control. This will
reduce the number of relay switches. Change 'put' function to call the
oxygen_update_dac_routing() function. Otherwise multichannel playback
does not work. Also there is a new function to apply settings, this
prevents from duplicating the code.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:50 +01:00
Roman Volkov 3dd77654fb ALSA: oxygen: Xonar DG(X): capture from I2S channel 1, not 2
Actually CS4245 connected to the I2S channel 1 for
capture, not channel 2. Otherwise capturing and
playback does not work for CS4245.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:49 +01:00
Roman Volkov 041f26b625 ALSA: oxygen: Xonar DG(X): move the mixer code into another file
Moving the mixer code away makes things easier. The mixer
will control the driver, so the functions of the
driver need to be non-static.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:49 +01:00
Roman Volkov 06f70d0da0 ALSA: oxygen: modify CS4245 register dumping function
Change the function to read the data from the new shadow buffer.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:48 +01:00
Roman Volkov 1f91ecc14d ALSA: oxygen: modify adjust_dg_dac_routing function
When selecting the audio output destinations (headphones,
FP headphones, multichannel output), the channel routing
should be changed depending on what destination selected.
Also unnecessary I2S channels are digitally muted. This
function called when the user selects the destination
in the ALSA mixer.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:48 +01:00
Roman Volkov fddc106bc3 ALSA: oxygen: Xonar DG(X): modify DAC/ADC parameters function
When selecting the audio sample rate for CS4245,
the MCLK divider should also be changed.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:47 +01:00
Roman Volkov 3c1611ddd1 ALSA: oxygen: Xonar DG(X): modify initialization functions
Change CS4245 initialization: different sequence and GPIO values,
according to datasheets and reverse-engineering information.
Change cleanup/resume/suspend functions, since they use
initialization.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:47 +01:00
Roman Volkov bed61935cc ALSA: oxygen: Xonar DG(X): add new CS4245 SPI functions
Add the new SPI write and read functions. The SPI read function
is used for creating initial registers dump and may be used for
debugging purposes. SPI operations are cached, so there is a new
function to manage the cache (shadow). I have to remove
the shift from the CS4245_SPI_* constants, since when
we are performing the reading, we need to shift by 8 instead
of 16.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:46 +01:00
Roman Volkov ddd624c332 ALSA: oxygen: additional definitions for the Xonar DG/DGX card
Add additional constants to the xonar_dg.h file:
capture and playback sources. Move GPIO_* constants and the
dg struct to the header file from the xonar_dg.c file.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:46 +01:00
Roman Volkov c4d4390c58 ALSA: oxygen: change description of the xonar_dg.c file
Add some additional information in comments and my copyright.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:45 +01:00
Roman Volkov e9c2f10b43 ALSA: oxygen: export oxygen_update_dac_routing symbol
When the user switches the output from stereo to multichannel
or vice versa, the driver needs to update the channel routing.
Instead of creating additional subroutines, I better export existing
oxygen_update_dac_routing symbol from the oxygen mixer
and call this function. It calls model.adjust_dac_routing()
and my function does the work.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:45 +01:00
Roman Volkov 079e0cb776 ALSA: oxygen: add mute mask for the OXYGEN_PLAY_ROUTING register
The Xonar DG/DGX driver needs this mask to mute unnecessary
channels.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:44 +01:00
Roman Volkov 303cff30d3 ALSA: oxygen: modify the SPI writing function
Modify the oxygen_write_spi() function to use the newly
introduced oxygen_wait_spi() function. Change return value
from void to int, so it can return error codes. Older
drivers just ignore that return value, new drivers can
check this value. We need to wait AFTER
initiating the SPI transaction, otherwise read
operation will not work.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:44 +01:00
Roman Volkov 10dd44dc88 ALSA: oxygen: add the separate SPI waiting function
The oxygen_wait_spi() function now performs waiting when the
SPI bus completes a transaction. Introduce the timeout error
checking and increase timeout to 200 from 40.

Signed-off-by: Roman Volkov <v1ron@mail.ru>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2014-01-29 20:45:43 +01:00
David Henningsson cd262518a3 ALSA: hda - Add parameter for dumping processing coefficients
Processing coefficients are often a vital part of the codec's configuration,
so dumping them can be important. However, because they are undocumented and
secret, we do not want to enable this for all codecs by default.

Therefore instead add this as a debugging parameter.

I have prepared for codecs that want to enable this by default by the extra
dump_coef bitfield, but unsure if we want to do that as long as the
(unlikely, but still) race remains.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-29 16:39:13 +01:00
Takashi Iwai a31886669f ASoC: Fixes for v3.14
A few fixes, all in drivers.  Nothing stands out particularly, the
 biggest set of fixes is some build coverage issues from Sachin.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJS5+nmAAoJELSic+t+oim9aMEQAIdCxUw2kZBkvJx+P2Zoncid
 u56PW1BeYd5NnRfU/XsVNI6F2RGRwzTY5yFKHZ5fc1E0PObRJ4USWPcbR9V8eVQj
 6NDP/b01iKbTJvjWVJYyIsn/690PnwPCcb9Zu8SPtry+BcMRpM53Mfkg5T+zHkNm
 e4dTPFmy8O1m+RI2XT6Zi4YoxkF8HwsFtPbQhu5ASsL5WpdD1q4w+oL861/e0Kpo
 2j3kBWkPjj8msDFeTbA7nXPWQrOx5TF9x5Z0stOnqt0G9rOOvtbnH1cd3xyMqK7+
 eM8kMstmhChW/mrxPYJwh6NMFWaBnAtqZ6eHZNCDXJhdQ3tZtPCcqaHLgFONPKyu
 /OkxvlzN5P1OyLvSofaWO1nWf+D833pMGCknSNxuS7WXfVHYCJ7WPIKqNbDT4r0C
 E0czsKcTFq7D24F8TNm6YTIakhbA3hpETCZRXAkIuEII2vmgORzomx6y65JPQc2M
 Igya0bgzU5pV8lx/02UtrzaXvYwb89/DdMmp4gM5CGdepiRWMSx+j/Ao40vlEGHC
 ZNm7P6MsG2D1h/GgyEV6yH3PnSxZgY5Vxm/9CNDfJss155B5wowKR70RI5nk3NIS
 d/tuRpuiMWeC+wLemBAW5wudYaeLPVZIQ+NLjty/8agFn843ePKpCNnhyaPmhekx
 l7yUEfUoA1yDQiDJysVD
 =ayMS
 -----END PGP SIGNATURE-----

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

ASoC: Fixes for v3.14

A few fixes, all in drivers.  Nothing stands out particularly, the
biggest set of fixes is some build coverage issues from Sachin.
2014-01-29 07:35:19 +01:00
Mark Brown e65523ca79 Merge remote-tracking branches 'asoc/fix/arizona', 'asoc/fix/fsl', 'asoc/fix/omap', 'asoc/fix/samsung', 'asoc/fix/simple', 'asoc/fix/tlv320aic32x4' and 'asoc/fix/wm5100' into asoc-linus 2014-01-27 18:18:36 +00:00
Markus Pargmann 609e6025b8 ASoC: tlv320aic32x4: Fix MICPGA input configuration
Currently the Negative Terminal Input Routing Configuration is only set
when there is a special routing configuration. If we don't use one of
the inputs IN1 or IN2 as negative terminal input, the PGA and recording
does not work.

This patch adds a route from CM1L/CM1R to the PGA as negative input by
default. With this configuration the PGA can amplify all input signals
and line-in/mic works again.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-27 18:13:44 +00:00
Markus Pargmann b44aa40f87 ASoC: tlv320aic32x4: Fix mono playback
Playback of a mono stream should output the same stream on both
channels. At the moment only the left analog signal is valid, the right
one is just noise.

This patch maps the left digital channel onto both DACs when receiving a
mono stream.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-27 18:13:40 +00:00
Adrien Vergé e7729a4153 ALSA: hda - Fix silent output on MacBook Air 1,1
Similarly to other Apple products, MBA 1,1 needs a specific quirk.
Pin 0x18 must be set to VREF_50 to have sound output.  This was no
longer done since commit 1a97b7f, resulting in a mute built-in speaker.

This patch corrects the regression by creating a fixup for the MBA 1,1.

Fixes: 1a97b7f227 ("ALSA: hda/realtek - Remove the last static quirks for ALC882")
Cc: <stable@vger.kernel.org> [v3.4+]
Tested-by: Adrien Vergé <adrienverge@gmail.com>
Signed-off-by: Adrien Vergé <adrienverge@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-25 09:17:34 +01:00
Sachin Kamat 4c021cc5a4 ASoC: samsung: Remove dma.h inclusion
mach/dma.h is not referenced by this file. Remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-24 13:18:06 +00:00
Sachin Kamat 57e33781ce ASoC: samsung: Add NULL check in i2s.c
'res' could be NULL from one of the operations above (line 1243). Thus
check 'res' for NULL before releasing the region to avoid null pointer
dereference.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-24 13:18:03 +00:00
Sachin Kamat 9b35a7b65f ASoC: Samsung: Fix build error due to missing dependency
Depend on MFD_ARIZONA to avoid the following build errors:

sound/soc/codecs/arizona.c:218: undefined reference to `arizona_request_irq'
sound/soc/codecs/arizona.c:226: undefined reference to `arizona_request_irq'
sound/soc/codecs/arizona.c:1719: undefined reference to `arizona_request_irq'

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-24 13:16:53 +00:00
Linus Torvalds f2c73464d7 ARM: SoC cleanups for 3.14
This is the branch where we usually queue up cleanup efforts, moving
 drivers out of the architecture directory, header file restructuring,
 etc. Sometimes they tangle with new development so it's hard to keep it
 strictly to cleanups.
 
 Some of the things included in this branch are:
 
 * Atmel SAMA5 conversion to common clock
 * Reset framework conversion for tegra platforms
  - Some of this depends on tegra clock driver reworks that are shared with Mike
    Turquette's clk tree.
 * Tegra DMA refactoring, which are shared branches with the DMA tree.
 * Removal of some header files on exynos to prepare for multiplatform
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJS4Vf7AAoJEIwa5zzehBx3f9UP/jwMlbfbSZHfNQ/QG0SqZ9RD
 zvddyDMHY/qXnzgF3Dax+JR9BDDVy8AlQe713FCoiHJZggWRAbbavkx8gxITDrZQ
 6NYaEkkuVxqyM8APl3PwMqYm8UZ8MUf4lCltlOA4jkesY9vue91AFnfyKh2CvHrn
 Leg4XT6mFzf/vYDL6RbvTz/Qr253uv3KvYBxkeiRNa0Y7OXRemEXSOfgxh0YGxUl
 LZ2IWQFOh/DH4kaeQI8V4G67X3ceHiFyhCnl0CPwfxaZaNBVaxvIFgIUTdetS6Sb
 zcXa029tE/Dfsr55vZAv9LUHEipCSOeE5rn2EJWehTWyM7vJ42Eozqgh+zfCjXS7
 Ib6g2npsvIluQit/RdITu44h5yZlrQsLgKTGJ8jjXqbT4HQ/746W8b/TP0YLtbw7
 N8oqr7k4vsZyF0dAYZQtfQUZeGISz67UbFcdzl9tmYOR7HFuAYkAQYst77zkVJf8
 om59BAYYTG5FNjQ4I9AKUfJzxXYveI6AKpXSCCZiahpFM2D1CJIzp9Wi0GwK1HRR
 sFVWhS0dajvz63pVVC2tw5Sq4J7onRRNGIXFPoE5fkmlelm0/q0zzGjw3Z0nTqbZ
 8zxuwuy2FfPJK11GbUAIhAgn1sCLYyAhl6IE+FsanGeMOSGIMrH0v5/HphAxoCXt
 BvqMDogyLoGPce1Gm3pJ
 =3CcT
 -----END PGP SIGNATURE-----

Merge tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC cleanups from Olof Johansson:
 "This is the branch where we usually queue up cleanup efforts, moving
  drivers out of the architecture directory, header file restructuring,
  etc.  Sometimes they tangle with new development so it's hard to keep
  it strictly to cleanups.

  Some of the things included in this branch are:

   * Atmel SAMA5 conversion to common clock
   * Reset framework conversion for tegra platforms
    - Some of this depends on tegra clock driver reworks that are shared
      with Mike Turquette's clk tree.
   * Tegra DMA refactoring, which are shared branches with the DMA tree.
   * Removal of some header files on exynos to prepare for
     multiplatform"

* tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (169 commits)
  ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h
  ARM: mvebu: remove prototypes of non-existing functions from common.h
  ARM: mvebu: move ARMADA_XP_MAX_CPUS to armada-370-xp.h
  serial: sh-sci: Rework baud rate calculation
  serial: sh-sci: Compute overrun_bit without using baud rate algo
  serial: sh-sci: Remove unused GPIO request code
  serial: sh-sci: Move overrun_bit and error_mask fields out of pdata
  serial: sh-sci: Support resources passed through platform resources
  serial: sh-sci: Don't check IRQ in verify port operation
  serial: sh-sci: Set the UPF_FIXED_PORT flag
  serial: sh-sci: Remove duplicate interrupt check in verify port op
  serial: sh-sci: Simplify baud rate calculation algorithms
  serial: sh-sci: Remove baud rate calculation algorithm 5
  serial: sh-sci: Sort headers alphabetically
  ARM: EXYNOS: Kill exynos_pm_late_initcall()
  ARM: EXYNOS: Consolidate selection of PM_GENERIC_DOMAINS for Exynos4
  ARM: at91: switch Calao QIL-A9260 board to DT
  clk: at91: fix pmc_clk_ids data type attriubte
  PM / devfreq: use inclusion <mach/map.h> instead of <plat/map-s5p.h>
  ARM: EXYNOS: remove <mach/regs-clock.h> for exynos
  ...
2014-01-23 18:36:55 -08:00
Sachin Kamat 4a9eee01b8 ASoC: samsung: Fix Kconfig dependency
Select S3C24XX_DMA instead of S3C2410_DMA to avoid following dependency issues
and build errors:

warning: (CPU_S3C2410 && CPU_S3C2442 && SND_SOC_SAMSUNG && SND_S3C24XX_I2S && SND_S3C2412_SOC_I2S && SND_SOC_SAMSUNG_SMDK2443_WM9710 && SND_SOC_SAMSUNG_LN2440SBC_ALC650) selects S3C2410_DMA which has unmet direct dependencies (ARCH_S3C24XX && S3C24XX_DMA && (CPU_S3C2410 || CPU_S3C2442))
warning: (CPU_S3C2410 && CPU_S3C2442 && SND_SOC_SAMSUNG && SND_S3C24XX_I2S && SND_S3C2412_SOC_I2S && SND_SOC_SAMSUNG_SMDK2443_WM9710 && SND_SOC_SAMSUNG_LN2440SBC_ALC650) selects S3C2410_DMA which has unmet direct dependencies (ARCH_S3C24XX && S3C24XX_DMA && (CPU_S3C2410 || CPU_S3C2442))

arch/arm/mach-s3c24xx/built-in.o: In function `s3c2410_dma_add':
arch/arm/mach-s3c24xx/dma-s3c2410.c:134: undefined reference to `s3c2410_dma_init'
arch/arm/mach-s3c24xx/dma-s3c2410.c:135: undefined reference to `s3c24xx_dma_order_set'
arch/arm/mach-s3c24xx/dma-s3c2410.c:136: undefined reference to `s3c24xx_dma_init_map'
arch/arm/plat-samsung/include/plat/dma-ops.h:60: undefined reference to `s3c_dma_get_ops'
sound/soc/samsung/s3c24xx-i2s.c:293: undefined reference to `s3c2410_dma_ctrl'
arch/arm/plat-samsung/include/plat/dma-ops.h:60: undefined reference to `s3c_dma_get_ops'
arch/arm/plat-samsung/include/plat/dma-ops.h:60: undefined reference to `s3c_dma_get_ops'
sound/built-in.o: In function `s3c2412_i2s_trigger':
sound/soc/samsung/s3c-i2s-v2.c:432: undefined reference to `s3c2410_dma_ctrl'

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-23 12:23:02 +00:00
Sachin Kamat 0cf0f17440 ASoC: wm5100: Export wm5100_detect
Export the symbol so that it is accessible to modules. Fixes the
following error:

ERROR: "wm5100_detect" [sound/soc/samsung/snd-soc-lowland.ko] undefined!

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-23 12:22:11 +00:00
Takashi Iwai deb6596f16 ALSA: Refactor slot assignment code
There are two loops that are almost identical but only with different
checks.  Refactor them with a simple helper, and give a bit more
comments what's doing there.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-23 11:45:24 +01:00
Dan Carpenter 4c3773eda4 ALSA: bits vs bytes bug in snd_card_create()
The test here is intended intended to prevent shift wrapping bugs when
we do "1U << idx2".  We should consider the number of bits in a u32
instead of the number of bytes.

[fix another chunk similarly by tiwai]

Fixes: 7bb2491b35 ('ALSA: Add kconfig to specify the max card numbers')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-23 10:50:36 +01:00
Sachin Kamat f83183ca3c ASoC: samsung: smdk_wm8994: Fix build error
Fixes the following build error and warning when OF is not defined:
sound/soc/samsung/smdk_wm8994.c:191:23: error: ‘samsung_wm8994_of_match’ undeclared (first use in this function)
sound/soc/samsung/smdk_wm8994.c:47:32: warning: ‘smdk_board_data’ defined but not used [-Wunused-variable]

of_match_ptr() is used so that samsung_wm8994_of_match gets dropped (as unused)
by the compiler when OF is not defined.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-22 17:13:45 +00:00
Sachin Kamat 9eeb95727c ASoC: Samsung: s3c-i2s-v2: Fix build error
Fixes the following error introduced by commit eca3b01d08
("ASoC: switch over to use snd_soc_register_component() on s3c i2s"):
sound/soc/samsung/s3c-i2s-v2.c:732:32: error: ‘drv’ undeclared (first use in this function)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-22 17:13:45 +00:00
Sachin Kamat abffae647e ASoC: samsung: Fix build regressions due to gpio re-org
Recent changes through commits c67d0f2926 ("ARM: s3c24xx: get rid
of custom <mach/gpio.h>"), b0161caa72 ("ARM: S3C[24|64]xx: move includes
back under <mach/> scope"), 364374121b ("ARM: s3c24xx: explicit
dependency on <plat/gpio-cfg.h>") and 41c3548e6d ("ARM: s3c64xx: get rid
of custom <mach/gpio.h>") caused build regressions due to broken
dependencies. Fix the following errors by including the necessary header
files explicitly:

sound/soc/samsung/h1940_uda1380.c:56:3: error: implicit declaration of function ‘S3C2410_GPG’
sound/soc/samsung/h1940_uda1380.c:149:18: error: ‘S3C_GPIO_END’ undeclared (first use in this function)
sound/soc/samsung/h1940_uda1380.c:234:21: error: ‘S3C_GPIO_END’ undeclared (first use in this function)
sound/soc/samsung/h1940_uda1380.c:270:12: error: ‘S3C_GPIO_END’ undeclared (first use in this function)
sound/soc/samsung/neo1973_wm8753.c:239:2: error: implicit declaration of function ‘S3C2410_GPJ’
sound/soc/samsung/rx1950_uda1380.c:67:3: error: implicit declaration of function ‘S3C2410_GPG’
sound/soc/samsung/s3c2412-i2s.c:86:2: error: implicit declaration of function ‘s3c_gpio_cfgall_range’
sound/soc/samsung/s3c2412-i2s.c:86:2: error: implicit declaration of function ‘S3C2410_GPE’
sound/soc/samsung/s3c2412-i2s.c:86:2: error: implicit declaration of function ‘S3C_GPIO_SFN’
sound/soc/samsung/s3c2412-i2s.c:87:10: error: ‘S3C_GPIO_PULL_NONE’ undeclared
sound/soc/samsung/s3c24xx-i2s.c:394:2: error: implicit declaration of function ‘s3c_gpio_cfgall_range’
sound/soc/samsung/s3c24xx-i2s.c:394:2: error: implicit declaration of function ‘S3C2410_GPE’
sound/soc/samsung/s3c24xx-i2s.c:394:2: error: implicit declaration of function ‘S3C_GPIO_SFN’
sound/soc/samsung/s3c24xx-i2s.c:395:10: error: ‘S3C_GPIO_PULL_NONE’ undeclared
sound/soc/samsung/smartq_wm8987.c:112:3: error: implicit declaration of function ‘S3C64XX_GPL’

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-22 17:13:45 +00:00
Takashi Iwai 2387083157 ALSA: hda - Apply +5dB output amp on ASUS Zenbook UX31A
ASUS Zenbook UX31A has yet another problem -- softer output level than
others.  According to the measurement, the peak output difference
between 31A and 31E is 5dB.  As ALC269VB has a COEF for the class-D
pre-amp, let's apply it for +5dB.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-22 08:32:02 +01:00
Takashi Iwai b75b1518a5 ALSA: cs46xx: Fix memory leak at destructor
The release of module object itself was forgotten.
Spotted by COVERIY CID 1162828.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-22 07:44:27 +01:00
Linus Torvalds ac26663572 MFD changes due for the v3.14 merge window
New drivers
  - Samsung Maxim 14577; Micro USB, Regulator, IRQ Controller and Battery Charger
  - TI/National Semiconductor LP3943 I2C GPIO Expander and PWM Generator
 
 Existing driver adaptions
  - Expansion of Wolfson Arizona DSP and High-Pass filter controls
  - TI TWL6040 default Regmap support and Regcache addition/bypass
  - Some nice Smatch catch fixes
  - Conversion of TI OMAP-USB and TI TWL6030 to endian neutralness
  - ChromeOS EC timing (delay) adaptions and added dependency on OF
  - Many constifications of 'struct {mfd_cell,regmap_irq,et. al}'
  - Watchdog support added for NVIDIA AS3722
  - Convert functions to static in TI AM335x
  - Realigned previously defeated functionality in TI AM335x
  - IIO ADC-TSC concurrency dead-lock/timeout resolution
  - Addition of Power Management and Clock support for Samsung core
  - DEFINE_PCI_DEVICE_TABLE macro removal from MFD Subsystem
  - Greater use of irqdomain functionality in ST-E AB8500
  - Removal of 'include/linux/mfd/abx500/ab8500-gpio.h'
  - Wolfson WM831x PMIC Power Management changes s/poweroff/shutdown/
  - Device Tree documentation added for TI/Nat Semi LP3943
  - Version detection and voltage tables for TI TPS6586x PMIC devices
  - Simplification of Freescale MC13XXX (de-)initialisation routines
  - Clean-up and simplification of the Realtek parent driver
  - Added support for RTL8402 Realtek PCI-Express card reader
  - Resource leak fix for Maxim 77686
  - Possible suspend BUG() fix in OMAP USB TLL
  - Support for new Wolfson WM5110 Revision (D)
  - Testing of automatic assignment of of_node in mfd_add_device()
    - Reversion of the above when it started to cause issues
  - Remove legacy Platform Data from;
               TI TWL Core, Qualcomm SSBI and ST-E ABx500 Pinctrl
  - Clean-ups; tabbing issues, function name changes, 'drvdata = NULL' removal,
               unused uninitialised warning mitigation, error message clarity,
               removal of redundant/duplicate checks, licensing (GPL -> GPL2),
               coding consistency, duplicate function declaration, ret checks,
               commit corrections, redundant of_match_ptr() helper removal,
               spelling, #if-deffery removal and header guards name changes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIbBAABAgAGBQJS3pLGAAoJEFGvii+H/HdhmkkP93Hrd9FBjVpmUQcOrghFDd//
 vte2LVDovXDcwm7i+BdZNG3+2aWtliTQXIw8PaAziUTwMlDNtT2B6GBFnIff4aXB
 Em/Oh6Je7r1gom1gMPCuefRrInTk0xEXy9Oazp4Hn4in71T+8PHNlEHdxEojakEm
 H5FnjAfgISEsA5twSyO9efVLNqPd3UQqg3O571oKwfuSED70YSCW2Yyaoiz4pnE5
 0WwZ9cel+sP7CIuyuR4TumUSDeBIAnYnZWqjqXZ1ueMWcm2RNVqeFrt/w0uoZjOA
 yBg8ZMfkBcePd6qnifqVqagRW/jW1bxmUeIHkp0bWeMqWN6Yyypitz8ZW+Qi7Swa
 OcmgM9V7OW1WG9FF7HoLbYHIPzmBb6duGtcCfAir4m8HJjyPfTuJpOshBW1F3+VG
 yEf5a1fj2NO34kvIbLec2f7MveIMmZxzWaoOx+ET9/WPknilifgyp7eDH24pQwI4
 5Lo5Z5uAfBCT3roOzHxCLl2nVXQoC66iTwdnneiEOn4rB/ApjfGVvGGd0VT6TD+g
 z3RqxpTdkd0AtjfeF778uTDBEKu7HZkqmlBP8HKWCBEAzqcKg7BpjYw0ajgmVwKr
 QiuBuWcEZ/2vVt8Qot7y5Vx89Q4AQwOqc24SldtQLu46iPAuKt+GizzHRw3IxBiQ
 VU9Aq/VoaTHBLS91tDE=
 =PuTE
 -----END PGP SIGNATURE-----

Merge tag 'mfd-3.14-1' of git://git.linaro.org/people/ljones/mfd

Pull MFD changes from Lee Jones:
 "New drivers
   - Samsung Maxim 14577; Micro USB, Regulator, IRQ Controller and
     Battery Charger
   - TI/National Semiconductor LP3943 I2C GPIO Expander and PWM
     Generator

  Existing driver adaptions
   - Expansion of Wolfson Arizona DSP and High-Pass filter controls
   - TI TWL6040 default Regmap support and Regcache addition/bypass
   - Some nice Smatch catch fixes
   - Conversion of TI OMAP-USB and TI TWL6030 to endian neutralness
   - ChromeOS EC timing (delay) adaptions and added dependency on OF
   - Many constifications of 'struct {mfd_cell,regmap_irq,et.al}'
   - Watchdog support added for NVIDIA AS3722
   - Convert functions to static in TI AM335x
   - Realigned previously defeated functionality in TI AM335x
   - IIO ADC-TSC concurrency dead-lock/timeout resolution
   - Addition of Power Management and Clock support for Samsung core
   - DEFINE_PCI_DEVICE_TABLE macro removal from MFD Subsystem
   - Greater use of irqdomain functionality in ST-E AB8500
   - Removal of 'include/linux/mfd/abx500/ab8500-gpio.h'
   - Wolfson WM831x PMIC Power Management changes s/poweroff/shutdown/
   - Device Tree documentation added for TI/Nat Semi LP3943
   - Version detection and voltage tables for TI TPS6586x PMIC devices
   - Simplification of Freescale MC13XXX (de-)initialisation routines
   - Clean-up and simplification of the Realtek parent driver
   - Added support for RTL8402 Realtek PCI-Express card reader
   - Resource leak fix for Maxim 77686
   - Possible suspend BUG() fix in OMAP USB TLL
   - Support for new Wolfson WM5110 Revision (D)
   - Testing of automatic assignment of of_node in mfd_add_device()
   - Reversion of the above when it started to cause issues
   - Remove legacy Platform Data from;
              TI TWL Core, Qualcomm SSBI and ST-E ABx500 Pinctrl
   - Clean-ups; tabbing issues, function name changes, 'drvdata = NULL'
              removal, unused uninitialised warning mitigation, error
              message clarity, removal of redundant/duplicate checks,
              licensing (GPL -> GPL2), coding consistency, duplicate
              function declaration, ret checks, commit corrections,
              redundant of_match_ptr() helper removal, spelling,
              #if-deffery removal and header guards name changes"

* tag 'mfd-3.14-1' of git://git.linaro.org/people/ljones/mfd: (78 commits)
  mfd: wm5110: Add register patch for rev D chip
  mfd: omap-usb-tll: Don't hold lock during pm_runtime_get/put_sync()
  gpio: lp3943: Remove redundant of_match_ptr helper
  mfd: sta2x11-mfd: Use named constants for pci_power_t values
  Documentation: mfd: Fix LDO index in s2mps11.txt
  mfd: Cleanup mfd-mcp-sa11x0.h header
  mfd: max8997: Use "IS_ENABLED(CONFIG_OF)" for DT code.
  mfd: twl6030: Fix endianness problem in IRQ handler
  mfd: sec-core: Add cells for S5M8767-clocks
  mfd: max14577: Remove redundant of_match_ptr helper
  mfd: twl6040: Fix sparse non static symbol warning
  mfd: Revert "mfd: Always assign of_node in mfd_add_device()"
  mfd: rtsx: Fix sparse non static symbol warning
  mfd: max77693: Set proper maximum register for MUIC regmap
  mfd: max77686: Fix regmap resource leak on driver remove
  mfd: Represent correct filenames in file headers
  mfd: rtsx: Add support for card reader rtl8402
  mfd: rtsx: Add set pull control macro and simplify rtl8411
  mfd: max8997: Enforce mfd_add_devices() return value check
  mfd: mc13xxx: Simplify probe() & remove()
  ...
2014-01-21 10:58:17 -08:00
Fabio Estevam efe2ab9b02 ASoC: fsl_ssi: Do not print 'baud clock' error message all the time
Currently everytime we get the following message on boot:

fsl-ssi-dai 202c000.ssi: could not get baud clock: -2

This is not really useful information to get on every boot, so make it a debug
message instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-21 18:48:35 +00:00
Fabio Estevam ae1f8ce192 ASoC: fsl_ssi: We do support master mode now
Since commit aafa85e71a (ASoC: fsl_ssi: Add DAI master mode support for SSI on
i.MX series) master mode is supported, so update the comments and code to
reflect that.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-21 18:48:00 +00:00
Charles Keepax 3435479243 ASoC: wm5110: Extend SYSCLK patch file for rev D
Latest evaluation of the the device has given some patch file additions
for improved performance.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-01-21 17:44:05 +00:00
Mark Brown a23544a6cc ASoC: omap: Make RX51 depend on GPIOLIB due to jack usage
Since the GPIO jacks are only supported if gpiolib is built and fail to
compile otherwise add a build depedency.  This is unlikely to have any
practical impact outside of coverage testing.

Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
2014-01-21 11:47:06 +00:00
Alexander Shiyan e5a3da2143 mfd: mc13xxx: Remove useless symbol MFD_MC13783
Symbol MFD_MC13783 always selected by MFD_MC13XXX, so no need
to keep additional symbol.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21 08:28:09 +00:00
Lee Jones 6eb37eb276 Immutable branch for ASoC, as requested by Mark Brown
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSjfuVAAoJEFGvii+H/HdhOYsP/2lrz6GLYBgQFp9H+6t95+8H
 KvFmefaM5pjoBdnq6Q7pZBxYO4m15J3TaFNzH+Ib6oWJlg/awpu1Qwu5+Pwwv9RK
 6x4mEyy9yDu2CJd+6wpBFxx1Ujj4CdAq5dm/bUMiCr0d4Ez2qZhxdiDPGB02QHv7
 J7KkJBnG0PSiV4uoiLh8pOQsCF+v5y1l0rUaI3ZG+7x2QAi9I3liZGBI02BVvXsh
 /0aYWc8xQUar1JurPNVN4I6cojyKp5oyq4SHkpdbkk3Yt7ek1aNoPMG6ORqvaEMn
 5WF7LISpFF1NrHifW5SUdnbx5dxOnZyKRRgEWcP1TMZEmSJ4mdYFbqgMIJCJuRCN
 k23mVQEcQYy+1V8CuymhMuIB4SBiNYLpbJ7bvQ/Q5N34yuVl9eqPxshcVgAUhFkc
 8+vZj+/be+lpxw4zhIrAS0IlEVjUvMs8/B/kmCfcKPID5zPLUWPVbxGRSPMDEpzS
 liR7uw94/LHUiW3JD7I1x2MchjK7sH55p22hZJFhqUcU0LjcFfY0+3mz0ljAuPZt
 BZrt1O3yW987m6WXVZmJDI10h0feh1K8TlpnnL3ppWO4cKsgoB7wruYxQtptVyZR
 wzN0rq6UyianNMIGHWYgHQ7ye8wzeazMZWTQLl8AblIJ3xXozsmLScKBHJGXgeKh
 jafyhkX8wFiEoEMGWW5G
 =IhEz
 -----END PGP SIGNATURE-----

Merge tag 'tags/ib-asoc-1' into for-mfd-next

Immutable branch for ASoC, as requested by Mark Brown
2014-01-21 08:23:16 +00:00
Mark Brown ac6d7c48e3 Merge remote-tracking branch 'asoc/topic/compress' into asoc-next 2014-01-20 11:50:41 +00:00
Mark Brown 31824e6554 Merge remote-tracking branch 'asoc/topic/dma' into asoc-next 2014-01-20 11:50:41 +00:00
Mark Brown 4cfa1a385f Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next 2014-01-20 11:50:40 +00:00
Arun Shamanna Lakshmi bd23c5b661 ASoC: dapm: Fix double prefix addition
The prefix for the codec driver can be used during dual identical
codec usecases. However, dapm adds prefix twice for codec DAI widget
in snd_soc_dapm_add_route API.

This change is to avoid double prefix addition for codec DAI widget
and is needed while using identical dual codecs.

Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-17 18:56:39 +00:00
Liam Girdwood 2a99ef0fdb ASoC: compress: Add suport for DPCM into compressed audio
Currently compressed audio streams are statically routed from the /dev
to the DAI link. Some DSPs can route compressed data to multiple BE DAIs
like they do for PCM data.

Add support to allow dynamically routed compressed streams using the existing
DPCM infrastructure. This patch adds special FE versions of the compressed ops
that work out the runtime routing.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-17 17:56:21 +00:00
Liam Girdwood 2360702530 ASoC: DPCM: make some DPCM API calls non static for compressed usage
The ASoC compressed code needs to call the internal DPCM APIs in order to
dynamically route compressed data to different DAIs.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-17 17:56:21 +00:00
Xiubo Li ec4f2857cd ASoC: core: Fix possible NULL pointer dereference of pcm->config
Since the soc generic dmaengine pcm driver allows using the defualt settings,
so the pcm->config maybe NULL.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-16 14:11:49 +00:00
Takashi Iwai 2aff4c9ce8 ASoC: More updates for v3.14
A few more updates for v3.14 since the last set, highlights include:
 
  - Lots of DMA updates from Lars-Peter
  - Improvements to the constraints handling code from Lars-Peter
  - A very helpful conversion of the TWL4030 driver to regmap from Peter
  - A new driver for the Freescale ESAI controller from Nicolin Chen
  - Conversion of some of the drivers to use params_width()
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJS19X7AAoJELSic+t+oim9/psQAIKo9sqkQEd6jg/jhSLw5mu5
 jVOvIGnSkmfhmnHtgHxFpJtnYiMCpTnUb1Irb16djO7ODpQ1yP3buv6Go5enUmVU
 zZgsFF+RudM16iXz6ZyAWW8BZJlMDAQTKkepAs7VLCt+FH/PaxOH7apZJi4dGCqj
 URt3NkvfJigPZciYcPGoFtSvSJnNb31ymdymmWxV6rTureyk9/KEKXiQ1r7QJWKY
 fQFyreSXaPfrAcBw8ALIHzdxJalW3M6hKQo9PhS5Z+yoqZRwc1XQ90I0LnB6xruo
 MZp+fQobxbioJDQjt7QluVOKpeUNojvG9dzeZaC7XS9qoejYFewwZNoscg0wljc6
 DveEmRgU7AcHo7PYzBqih8gQGBw0Rhl08b0demyq/XHfaJ8Uf8Whfmwmv9MMXpju
 6rR9yU2lsne/w+ND8Jj0FPvzARQrLjIXOJEWP9q58ZpDeiUBhcZN9qMtnTyAmh6P
 mauPd+mmBRLgojfD4+CDSMIFItGKc3rPivCIK7QRMps+aHcitiJO5AOhhBR18Z6Q
 W3LGrr1oGkc9gZQzaN5dOiPJ9ywJWReuca7EVp7eAK27HGMXfSvTC162uVM7Rv/v
 N2OtH+6ar2By5Q5HS8if7fU/n6E0QWU++WbTcfny/VHAJXz2p6uIFbymBH8H+5ws
 JC2F3pHVrCFF9rdgPrKy
 =9Nvq
 -----END PGP SIGNATURE-----

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

ASoC: More updates for v3.14

A few more updates for v3.14 since the last set, highlights include:

 - Lots of DMA updates from Lars-Peter
 - Improvements to the constraints handling code from Lars-Peter
 - A very helpful conversion of the TWL4030 driver to regmap from Peter
 - A new driver for the Freescale ESAI controller from Nicolin Chen
 - Conversion of some of the drivers to use params_width()
2014-01-16 14:54:00 +01:00
Mark Brown 701caa51a2 Merge remote-tracking branches 'asoc/topic/adsp', 'asoc/topic/atmel', 'asoc/topic/bcm2835', 'asoc/topic/docs', 'asoc/topic/fsl', 'asoc/topic/generic', 'asoc/topic/kirkwood', 'asoc/topic/mc13783', 'asoc/topic/mxs', 'asoc/topic/nuc900', 'asoc/topic/sai', 'asoc/topic/sh', 'asoc/topic/ssm2602', 'asoc/topic/tlv320aic3x', 'asoc/topic/twl4030', 'asoc/topic/ux500', 'asoc/topic/width' and 'asoc/topic/x86' into for-tiwai 2014-01-16 12:44:01 +00:00
Mark Brown a4c83a2d00 Merge remote-tracking branch 'asoc/topic/arizona' into for-tiwai 2014-01-16 12:43:55 +00:00
Mark Brown 2f43a23ab9 Merge remote-tracking branch 'asoc/topic/pcm' into for-tiwai 2014-01-16 12:42:57 +00:00
Mark Brown 7cfa7b5473 Merge remote-tracking branch 'asoc/topic/dma' into for-tiwai 2014-01-16 12:42:54 +00:00
Mark Brown 99896f714a Merge remote-tracking branch 'asoc/topic/dapm' into for-tiwai 2014-01-16 12:42:53 +00:00
Mark Brown a9b68d3b90 Merge remote-tracking branch 'asoc/topic/core' into for-tiwai 2014-01-16 12:42:53 +00:00
Mark Brown efe265d301 Merge remote-tracking branches 'asoc/fix/adau1701' and 'asoc/fix/tlv320aic32x4' into for-tiwai 2014-01-16 12:42:51 +00:00
Hui Wang c48ae0ab37 ALSA: hda - add headset mic detect quirks for some Dell machines
When we plug a 3-ring headset on some Dell machines, the headset
mic can't be detected, after apply this patch, the headset mic
can work well on all those machines.

On the machine with the Subsytem ID 0x10280610, if we use
ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, the headset mic can be
detected and work well, but the sound can't be outputed via
headphone anymore, use ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
can fix this problem.

BugLink: https://bugs.launchpad.net/bugs/1260303
Cc: David Henningsson <david.henningsson@canonical.com>
Tested-by: David Chen <david.chen@canonical.com>
Tested-by: Cyrus Lien <cyrus.lien@canonical.com>
Tested-by: Shawn Wang <shawn.wang@canonical.com>
Tested-by: Chih-Hsyuan Ho <chih.ho@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-16 12:43:15 +01:00
Markus Pargmann e8e08c521d ASoC: tlv320aic32x4: Fix regmap range_min
range_min is the lowest address in the virtual register range. This is
the first register with address 0, not the first register of page 1.

Currently all writes to page 1 are mapped to page 0, so the codec fails
to operate.

Fixes: 4d208ca429 (ASoC: tlv320aic32x4: Convert to direct regmap API usage)
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org (v3.13 if the fix misses -final)
2014-01-15 23:12:44 +00:00
Mark Brown 1104a9c822 ASoC: core: Return -ENOTSUPP from set_sysclk() if no operation provided
Make it easier for generic code to work with set_sysclk() by distinguishing
between the operation not being supported and an error as is done for
other operations like set_dai_fmt()

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-15 23:06:59 +00:00
Arun Shamanna Lakshmi f7d3c17096 ASoC: dapm: Change prototype of soc_widget_read
soc_widget_read API returns the register data and it is possible
that a register can contain 0xffffffff. Thus, change the prototype
of soc_widget_read to return only the error code and pass the reg
data through pointer argument.

Signed-off-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-15 11:43:27 +00:00
Lars-Peter Clausen d70e861a31 ASoC: samsung: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag
The Samsung dmaengine ASoC driver is used with two different dmaengine drivers.
The pl80x, which properly supports residue reporting and the pl330, which
reports that it does not support residue reporting. So there is no need to
manually set the NO_RESIDUE flag. This has the advantage that a proper (race
condition free) PCM pointer() implementation is used when the pl80x driver is
used. Also once the pl330 driver supports residue reporting the ASoC PCM driver
will automatically start using it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 21:28:39 +00:00
Lars-Peter Clausen 153e66f513 ASoC: axi-{spdif,i2s}: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag
The pl330 driver properly reports that it does not have residue reporting
support, which means the PCM dmanegine driver is able to figure this out on its
own. So there is no need to set the flag manually. Removing the flag has the
advantage that once the pl330 driver gains support for residue reporting it will
automatically be used by the generic dmaengine PCM driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 21:28:39 +00:00
Lars-Peter Clausen 478028e088 ASoC: generic-dmaengine-pcm: Check DMA residue granularity
The dmaengine framework now exposes the granularity with which it is able to
report the transfer residue for a certain DMA channel. Check the granularity in
the generic dmaengine PCM driver and
	a) Set the SNDRV_PCM_INFO_BATCH if the granularity is per period or worse.
	b) Fallback to the (race condition prone) period counting if the driver does
	not support any residue reporting.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 21:28:39 +00:00
Lars-Peter Clausen 93b943edfc ASoC: generic-dmaengine-pcm: Check NO_RESIDUE flag at runtime
Currently we have two different snd_soc_platform_driver structs in the generic
dmaengine PCM driver. One for dmaengine drivers that support residue reporting
and one for those which do not. When registering the PCM component we check
whether the NO_RESIDUE flag is set or not and use the corresponding
snd_soc_platform_driver. This patch modifies the driver to only have one
snd_soc_platform_driver struct where the pointer() callback checks the
NO_RESIDUE flag at runtime. This allows us to set the NO_RESIDUE flag after the
PCM component has been registered. This becomes necessary when querying whether
the dmaengine driver supports residue reporting from the dmaengine driver itself
since the DMA channel might only be requested after the PCM component has been
registered.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 21:28:39 +00:00
Mark Brown 8e6714ac60 Merge branch 'topic/samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-dma 2014-01-14 21:28:35 +00:00
Mark Brown 67c2fe2f5d Merge branch 'topic/axi' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-dma 2014-01-14 21:28:22 +00:00
Xiubo Li ca919fe4b9 ASoC: simple-card: fix one bug to writing to the platform data
It's a bug that writing to the platform data directly, for it should
be constant. So just copy it before writing.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 21:25:48 +00:00
Lars-Peter Clausen 55dcdb5051 ASoC: pcm: Use snd_pcm_rate_mask_intersect() helper
Instead of open-coding the intersecting of two rate masks (and getting slightly
wrong for some of the corner cases) use the new snd_pcm_rate_mask_intersect()
helper function.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 20:42:34 +00:00
Lars-Peter Clausen e3a9269f87 ALSA: Add helper function for intersecting two rate masks
A bit of special care is necessary when creating the intersection of two rate
masks. This comes from the special meaning of the SNDRV_PCM_RATE_CONTINUOUS and
SNDRV_PCM_RATE_KNOT bits, which needs special handling when intersecting two
rate masks. SNDRV_PCM_RATE_CONTINUOUS means the hardware supports all rates in a
specific interval. SNDRV_PCM_RATE_KNOT means the hardware supports a set of
discrete rates specified by a list constraint. For all other cases the supported
rates are specified directly in the rate mask.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 20:42:34 +00:00
Lars-Peter Clausen bf103eb4af ASoC: s6000: Don't mix SNDRV_PCM_RATE_CONTINUOUS with specific rates
SNDRV_PCM_RATE_CONTINUOUS means that all rates (possibly limited to a certain
interval) are supported. There is no need to manually set other rate bits.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 20:42:29 +00:00
Lars-Peter Clausen 24710c9796 ASoC: fsl: Don't mix SNDRV_PCM_RATE_CONTINUOUS with specific rates
SNDRV_PCM_RATE_CONTINUOUS means that all rates (possibly limited to a certain
interval) are supported. There is no need to manually set other rate bits.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 20:42:26 +00:00
Lars-Peter Clausen 817873f4b1 ASoC: pcm: Properly initialize hw->rate_max
If none of the components (CODEC or CPU DAI) sets a maximum sample rate we'll
end up with the rate_max field of the runtime hardware set to 0.  (Note that it
is still possible for the components to constrain the supported sample rates
using other methods, e.g. setting a list constraint) If rate_max is 0 this means
that the sound card doesn't support any rates at all, which is not the desired
result. So initialize rate_max to UINT_MAX. For symmetry reasons also set
rate_min to 0.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 20:41:57 +00:00
Mark Brown 64a9aa9cf5 Linux 3.13-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQEcBAABAgAGBQJSogqUAAoJEHm+PkMAQRiGM2MIAJrr5KEXEWuuAR4+JkkWBK7A
 +dVT4n1MM4wP/aCIyriSlq7kgT03Wxk4Q4wKsj2wZvDQkNgEQjrctgIihc75jqi5
 126nmT3YXJLwgDpFA3RHZUWve3j3vfUG53rRuk7K9Xx1sGWU3Ls7BuInvQZ//+QS
 6UB4UuEAalmose5U8ToXQfMqZhjwreZKeb64TEZwFvu2klv4cnka1L/zHbmQGgRg
 2Pfv+aUrjsYE8s9lkEKX8MIQsDn28Q5Lsv7XIEQwo2at4rYbJaxX6usuC1OI0MQ5
 BLUn1GgtvOidq6FzSg6kXiA/MJYH3J0S+p4uULWAprxA+KeJRbWNRroM94W1qAk=
 =1Wcq
 -----END PGP SIGNATURE-----

Merge tag 'v3.13-rc3' into asoc-pcm

Linux 3.13-rc3
2014-01-14 20:41:53 +00:00
Arnd Bergmann cdef2e5f35 sound: oss: remove last sleep_on users
There are three files in oss for which I could not find an easy way to
replace interruptible_sleep_on_timeout with a non-racy version. This
patch instead just adds a private implementation of the function, now
named oss_broken_sleep_on, and changes over the remaining users in
sound/oss/ so we can remove the global interface.

[fixed coding style warnings by tiwai]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 16:12:07 +01:00
Arnd Bergmann 1a1e0a80ce sound: oss: dmasound: kill SLEEP() macro to avoid race
The use of interruptible_sleep_on_timeout in the dmasound driver
is questionable and we want to kill off all sleep_on variants.
This replaces the calls with wait_event_interruptible_timeout
where possible, to wait for a particular event instead of blocking
in a racy way. In the sq_write function, the easiest solution is
an open-coded prepare_to_wait loop.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 16:12:07 +01:00
Arnd Bergmann 76439c2ac6 sound: oss: midibuf: fix sleep_on races
sleep_on is known to be racy and going away because of this. All instances
of interruptible_sleep_on and interruptible_sleep_on_timeout in the midibuf
driver can trivially be replaced with wait_event_interruptible and
wait_event_interruptible_timeout.

[fixed coding style warnings by tiwai]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 16:11:44 +01:00
Arnd Bergmann 7bd6972a92 sound: oss: vwsnd: avoid interruptible_sleep_on
Interruptible_sleep_on is racy and we want to remove it. This replaces
the use in the vwsnd driver with an open-coded prepare_to_wait
loop that fixes the race between concurrent open() and close() calls,
and also drops the global mutex while waiting here, which restores
the original behavior that was changed during the BKL removal.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 16:01:27 +01:00
Arnd Bergmann 1a21576562 sound: oss: msnd_pinnacle: avoid interruptible_sleep_on_timeout
We want to remove all sleep_on variants from the kernel because they are
racy. In case of the pinnacle driver, we can replace
interruptible_sleep_on_timeout with wait_event_interruptible_timeout
by changing the meaning of a few flags used in the driver so they
are cleared at wakeup time, which is a somewhat more appropriate
way to do the same, although probably still racy.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 16:01:20 +01:00
Takashi Iwai cf67c8e71b ALSA: hda - Fix endless vmaster hook call in thinkpad_helper.c
The new vmaster hook, update_tpacpi_mute_led(), calls the original
vmaster hook, but I forgot to save the original hook function but keep
calling the updated one, which of course results in a stupid endless
loop.  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 14:56:55 +01:00
Daniel Mack 358b7dfa1c ALSA: snd-usb: re-order some quirk entries
No code change, just a cosmetic cleanup to keep entries ordered by the
device ID within a block of unique vendor IDs.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 14:40:08 +01:00
Pavel Hofman 8c4b79cf21 ALSA: usb-audio: Fix Creative VF0420 rate
Creative Live! Cam Vista IM (VF0420) reports rate of 16kHz while working
at 8kHz. The patch adds its USB ID to the existing quirk.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 14:23:47 +01:00
Eduard Gilmutdinov 11e424e88b ALSA: usb-audio: Add support for Focusrite Saffire 6 USB
Signed-off-by: Eduard Gilmutdinov <edgilmutdinov@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 13:56:31 +01:00
Hui Wang 493a52a9b6 ALSA: hda - automute via amp instead of pinctl on some AIO models
On some AIO (All In One) models with the codec alc668
(Vendor ID: 0x10ec0668) on it, when we plug a headphone into the jack,
the system will switch the output to headphone and set the speaker to
automute as well as change the speaker Pin-ctls from 0x40 to 0x00,
this will bring loud noise to the headphone.

I tried to disable the corresponding EAPD, but it did not help to
eliminate the noise.

According to Takashi's suggestion, we use amp operation to replace the
pinctl modification for the automute, this really eliminate the noise.

BugLink: https://bugs.launchpad.net/bugs/1268468
Cc: David Henningsson <david.henningsson@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-14 10:42:29 +01:00
Xiubo Li ba194a4de5 ASoC: simple-card: use snd_soc_card_set/get_drvdata
Remove asoc_simple_get_card_info macro and use snd_soc_card_set_drvdata
and snd_soc_card_get_drvdata instead.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 17:38:36 +00:00
Takashi Iwai dfc6e469b6 ALSA: hda - Apply codec power_filter to FG nodes
Apply the codec->power_filter to the FG nodes in general for reducing
hackish set_power_state ops override in patch_sigmatel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-13 16:30:15 +01:00
Markus Pargmann 6d0d5103bd ASoC: codec: tlv320aic32x4: Fix regmap range config
This codec driver fails to probe because it has a higher regmap
range_max value than max_register. This patch sets the range_max to the
max_register value as described in the for struct regmap_range_cfg:
"@range_max: Address of the highest register in virtual range."

Fixes: 4d208ca429 (ASoC: tlv320aic32x4: Convert to direct regmap API usage)
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org (v3.13 if the fix misses -final)
2014-01-13 12:34:51 +00:00
Mark Brown 0058e45960 ASoC: max9850: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:53 +00:00
Mark Brown 580ce08d5c ASoC: max98095: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:53 +00:00
Mark Brown 7821afc486 ASoC: max98090: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:53 +00:00
Mark Brown 793f77036d ASoC: max98088: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:52 +00:00
Mark Brown 359e2ae897 ASoC: isabelle: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:52 +00:00
Mark Brown 2822a9d01c ASoC: da9055: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:52 +00:00
Mark Brown abf82ae6a6 ASoC: da732x: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:51 +00:00
Mark Brown e7610743d4 ASoC: da7213: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:51 +00:00
Mark Brown 0194c42a8f ASoC: da7210: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:51 +00:00
Mark Brown 1b6b0dfac2 ASoC: cs42l51: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:50 +00:00
Mark Brown 2dad2283c5 ASoC: alc5632: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:50 +00:00
Mark Brown 4a608b3af3 ASoC: alc5623: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:45:50 +00:00
Takashi Iwai cbd209f41e ALSA: hda - Don't set indep_hp flag for old AD codecs
Some old AD codecs don't like the independent HP handling, either it
contains a single DAC (AD1981) or it mandates the mixer routing
(AD1986A).  This patch removes the indep_hp flag for such codecs.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68081
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-13 12:40:07 +01:00
Takashi Iwai 80ab8eae70 ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masks
The PCI devices with DMA masks smaller than 32bit should enable
CONFIG_ZONE_DMA.  Since the recent change of page allocator, page
allocations via dma_alloc_coherent() with the limited DMA mask bits
may fail more frequently, ended up with no available buffers, when
CONFIG_ZONE_DMA isn't enabled.  With CONFIG_ZONE_DMA, the system has
much more chance to obtain such pages.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68221
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-11 11:05:13 +01:00
Takashi Iwai 6ab08ced64 ALSA: PCM: Warn when buffer preallocation fails
The failures of buffer preallocations at driver initializations aren't
critical but it's still helpful to inform, so that user can know that
something doesn't work as expected.

For example, the recent page allocator change triggered regressions,
but developers didn't notice until recently because the driver didn't
complain.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-11 11:04:23 +01:00
Nicolin Chen 43d24e76b6 ASoC: fsl_esai: Add ESAI CPU DAI driver
This patch implements a device-tree-only CPU DAI driver for Freescale ESAI
controller that supports:

 - 12 channels playback and 8 channels record.
   [ Some of the inner transmitters and receivers are sharing same group of
     pins. So the maxmium 12 output or 8 input channels are only valid if
     there is no pin conflict occurring to it. ]

 - Independent (asynchronous mode) or shared (synchronous mode) transmit and
   receive sections with separate or shared internal/external clocks and frame
   syncs, operating in Master or Slave mode.
   [ Current ALSA seems not to allow CPU DAI drivers to configure DAI format
     separately for PLAYBACK and CAPTURE. So this first version only supports
     the case that uses the same DAI format for both directions. ]

 - Various DAI formats: I2S, Left-Justified, Right-Justified, DSP-A and DSP-B.

 - Programmable word length (8, 16, 20 or 24bits)

 - Flexible selection between system clock or external oscillator as input
   clock source, programmable internal clock divider and frame sync generation.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-10 12:52:15 +00:00
Charles Keepax afb6d4ed3f ASoC: wm5110: Add controls for headphone short circuit protection
Add controls to enable/disable the headphone short circuit protection of
the headphone outputs.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-10 11:52:26 +00:00
Mark Brown fce6bd84d6 Linux 3.13-rc3
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQEcBAABAgAGBQJSogqUAAoJEHm+PkMAQRiGM2MIAJrr5KEXEWuuAR4+JkkWBK7A
 +dVT4n1MM4wP/aCIyriSlq7kgT03Wxk4Q4wKsj2wZvDQkNgEQjrctgIihc75jqi5
 126nmT3YXJLwgDpFA3RHZUWve3j3vfUG53rRuk7K9Xx1sGWU3Ls7BuInvQZ//+QS
 6UB4UuEAalmose5U8ToXQfMqZhjwreZKeb64TEZwFvu2klv4cnka1L/zHbmQGgRg
 2Pfv+aUrjsYE8s9lkEKX8MIQsDn28Q5Lsv7XIEQwo2at4rYbJaxX6usuC1OI0MQ5
 BLUn1GgtvOidq6FzSg6kXiA/MJYH3J0S+p4uULWAprxA+KeJRbWNRroM94W1qAk=
 =1Wcq
 -----END PGP SIGNATURE-----

Merge tag 'v3.13-rc3' into asoc-arizona

Linux 3.13-rc3
2014-01-10 11:52:05 +00:00
Sarah Bessmer e240a46965 ALSA: ctxfi - Work around emu20k1 glitch to prevent buffered sound data loss
Occasionally, on playback stream ringbuffer wraparound, the EMU20K1
hardware will momentarily return 0 instead of the proper current(loop)
address. This patch handles that case, fixing the problem of playback
position corruption and subsequent loss of buffered sound data, that
occurs with some common buffering layout patterns(e.g. multiple
simultaneous output streams with differently-sized or
non-power-of-2-sized buffers).

An alternate means of fixing the problem would be to read the ca
register continuously, until two sequential reads return the same
value; however, that would be a more invasive change, has performance
implications, and isn't necessary unless there are also issues with the
value not being updated atomically in regards to individual bits or
something similar(which I have not encountered through light testing).

I have no EMU20K2 hardware to confirm if the issue is present there,
but even if it's not, this change shouldn't break anything that's not
already broken.

Signed-off-by: Sarah Bessmer <aotos@fastmail.fm>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-10 10:10:41 +01:00
Xiubo Li 34787d0a25 ASoC: simple-card: fix the cinfo error check
If the dt is used and the cinfo is NULL, the -ENOMEM should be return.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 17:38:09 +00:00
Xiubo Li 708ec0241c ASoC: simple-card: fix a bug where cinfo will be NULL before using it
If the dt is not used, the cinfo will be always NULL before using it.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 17:35:46 +00:00
Nicolin Chen 2b56b5f020 ASoC: fsl_ssi: Set default slot number for common cases
For those platforms using DAI master mode like I2S, it's better to pre-set
a default slot number so that there's no need for these common cases to set
the slot number from its machine driver any more.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 17:33:31 +00:00
Wei Yongjun e1cffe8c9f ASoC: fsl-ssi: Add missing clk_disable_unprepare() on error in fsl_ssi_probe()
Add the missing clk_disable_unprepare() before return from
fsl_ssi_probe() in the request irq error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 17:26:01 +00:00
Lars-Peter Clausen 16d7ea9167 ASoC: Allow PCMs to restrict the supported formats
Some DMA cores might add additional restrictions on which in memory audio
formats can be supported by the compound sound card. If the PCM component
specifies a set of formats it supports (by setting the formats field to non 0)
take these into account when calculating the format set for the compound sound
card.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 14:31:59 +00:00
Lars-Peter Clausen df021a72c9 ASoC: ux500: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 14:30:27 +00:00
Lars-Peter Clausen a7ddf151b0 ASoC: sh: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 14:29:44 +00:00
Lars-Peter Clausen 1153677134 ASoC: nuc900: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 14:29:02 +00:00
Lars-Peter Clausen 3317208c88 ASoC: kirkwood: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 14:28:22 +00:00
Lars-Peter Clausen c098284a4b ASoC: intel: Don't set unused struct snd_pcm_hardware fields
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 14:27:39 +00:00
Mark Brown cf7d8b274f ASoC: adav80x: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-01-09 13:59:33 +00:00
Mark Brown 9b58e71634 ASoC: adau1701: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-01-09 13:59:30 +00:00
Mark Brown 7c2aff6ab5 ASoC: adau1373: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-01-09 13:59:28 +00:00
Mark Brown d4dd1fdf9e ASoC: ad193x: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-01-09 13:59:26 +00:00