Commit graph

401774 commits

Author SHA1 Message Date
Takashi Iwai
95ff71e938 ASoC: wm5100: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:36 +00:00
Takashi Iwai
4a9e0f919c ASoC: wm8580: Use WARN() instead of BUG_ON()
Use WARN() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:28 +00:00
Takashi Iwai
bf90e895b5 ASoC: wm2000: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:25 +00:00
Takashi Iwai
f5b3a56394 ASoC: wm0010: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:21 +00:00
Takashi Iwai
773392b25c ASoC: tpa6130a2: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:18 +00:00
Takashi Iwai
a922cd7151 ASoC: max98095: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:16 +00:00
Takashi Iwai
bee026d0fe ASoC: max98088: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:14 +00:00
Takashi Iwai
ddb146da23 ASoC: blackfin: Use WARN_ON() instead of BUG_ON()
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 10:26:09 +00:00
David Henningsson
d5b6b65e75 ALSA: hda - Make sure mute LEDs stay on during runtime suspend (Realtek)
Some HP machines with Realtek codecs have mute LEDs connected to VREF pins.
However when these go into runtime suspend, the pin powers down and its
pin control is disabled, thus disabling the LED too.

This patch fixes that issue by making sure that the pin stays in D0 with
correct pin control.

Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/1248465
Tested-by: Franz Hsieh <franz.hsieh@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 11:08:12 +01:00
Oskar Schirmer
68f9672b13 ASoC: fsl: imx-pcm-fiq: remove bogus period delta calculation
Originally snd_hrtimer_callback() used iprtd->period_time for
some jiffies based estimation to determine the right moment
to call snd_pcm_period_elapsed(). As timer drifts may well be a
problem, this was changed in commit b4e82b5b78 to be based
on buffer transmission progress, using iprtd->offset and
runtime->buffer_size to calculate the amount of data since last
period had elapsed.

Unfortunately, iprtd->offset counts in bytes, while
runtime->buffer_size counts frames, so adding these to find some
delta is like comparing apples and oranges, and eventually results
in negative delta values every now and then. This is no big harm,
because it simply causes snd_pcm_period_elapsed() being called
more often than necessary, as negative delta is taken for a
large unsigned value by implicit conversion rule.
Nonetheless, the calculation is broken, so one would replace
the runtime->buffer_size by its equivalent in bytes.

But then, there are chances snd_pcm_period_elapsed() is called
late, because calculating the moment for the elapsed period
into delta is based against the iprtd->last_offset, which is not
necessarily the first byte of the period in question, but some
random byte which the FIQ handler left us with in r8/r9 by
accident. Again, negative impact is low, as there are plenty of
periods already prefilled with data, and snd_pcm_period_elapsed()
will probably be called latest when the following period is
reached. However, the calculation is conceptually broken, and we
are best off removing the clever stuff altogether.

snd_pcm_period_elapsed() is now simply called once everytime
snd_hrtimer_callback() is run, which may not be most accurate,
but at least this way we are quite sure we dont miss an end of
period. There is not much extra effort wasted by superfluous
calls to snd_pcm_period_elapsed(), as the timer frequency
closely matches the period size anyway.

Signed-off-by: Oskar Schirmer <oskar@scara.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-06 09:41:57 +00:00
Takashi Iwai
88ec7ae82d ALSA: pxa2xx: Replace BUG() with snd_BUG()
BUG() used in the driver is just to spit the stack trace on buggy
points, not really needed to stop the whole operation.  For that
purpose, it'd be more convenient to use snd_BUG() instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 08:35:28 +01:00
Takashi Iwai
c3cd1badc8 ALSA: mips/ad1843: Use WARN_ON() instead of BUG_ON()
BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 08:35:16 +01:00
Takashi Iwai
5a19b178d7 ALSA: sparc/cs4231: Use WARN_ON() instead of BUG_ON()
BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 08:35:07 +01:00
Takashi Iwai
025be74c1d ALSA: ps3: Use WARN_ON() instead of BUG_ON()
BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 08:34:58 +01:00
Takashi Iwai
29fa957804 ALSA: ctxfi: Use WARN_ON() instead of BUG_ON()
BUG_ON() is rather useless for debugging as it leads to panic().
Use WARN_ON() and handle the error cases accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 08:34:49 +01:00
Takashi Iwai
791b3f596e ALSA: intel8x0: Fix chmap application
The playback chmap for multi-channel stream hasn't been properly added
to intel8x0 devices due to the wrong condition.

Reported-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 08:14:21 +01:00
Takashi Iwai
8fe7b65ab4 ALSA: hda - Apply GPIO setup for MacBooks with CS4208
Apply the existing GPIO0 fixup as default for MacBooks with CS4208
codec.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64401
Cc: <stable@vger.kernel.org> [v3.12+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-06 08:08:53 +01:00
Takashi Iwai
fab1285a51 ALSA: hda - Name Haswell HDMI controllers better
"HDA Intel MID" is no correct name for Haswell HDMI controllers.
Give them a better name, "HDA Intel HDMI".

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 17:54:05 +01:00
Takashi Iwai
33499a15c2 ALSA: hda - Force buffer alignment for Haswell HDMI controllers
Haswell HDMI audio controllers seem to get stuck when unaligned buffer
size is used.  Let's enable the buffer alignment for the corresponding
entries.

Since AZX_DCAPS_INTEL_PCH contains AZX_DCAPS_BUFSIZE that disables the
buffer alignment forcibly, define AZX_DCAPS_INTEL_HASWELL and put the
necessary AZX_DCAPS bits there.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=60769
Reported-by: Alexander E. Patrakov <patrakov@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 17:38:20 +01:00
Linus Walleij
a1c22cdc77 ALSA: atmel: remove dependency on <mach/gpio.h>
This include is completely unused since the AT91 sound driver
actually uses gpiolib properly.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 13:43:25 +01:00
David Henningsson
b67ae3f1c9 ALSA: hda - Enable Thinkpad mute/micmute LEDs for Realtek
Same as we already have for Conexant. Right now it's only enabled
for one machine.

Tested-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 13:42:21 +01:00
Clemens Ladisch
bbaa0d6665 ALSA: hda: add device IDs for AMD Evergreen/Northern Islands HDMI
The device IDs of the AMD Cypress/Juniper/Redwood/Cedar/Cayman/Antilles/
Barts/Turks/Caicos HDMI HDA controllers weren't added explicitly
because the generic entry works, but it made the device appearing as
"Generic", and people are confused as if it's no proper HDMI
controller.  Add them so that the name shows up properly as "ATI HDMI"
instead of "Generic".

According to Takashi's tests and the lack of complaints, these devices
work fine without disabling snooping.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 10:26:56 +01:00
Takashi Iwai
a1114a8c68 ALSA: hda - Introduce the bitmask for excluding output volume
Add a bitmask to hda_gen_spec indicating NIDs to exclude from the
possible volume controls.  That is, when the bit is set, the NID
corresponding to the bit won't be picked as an output volume control
any longer.

Basically this is just a band-aid for working around the issue found
with CS4208 codec, where only the headphone pin has a volume AMP with
different dB steps.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=60811
Cc: <stable@vger.kernel.org> [v3.12+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 07:49:41 +01:00
Takashi Iwai
485e3e0cdf ALSA: hda - Add sanity check of vmaster slave dB steps
Check whether all vmaster slaves have the same dB steps.  Otherwise
the behavior would become inconsistent.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 07:48:04 +01:00
Takashi Iwai
a4e7a12168 ALSA: hda - Fix possible zero-division
Check the TLV db scale result before actually dividing in vmaster
slave init code.  Also mask TLV_DB_SCALE_MUTE bit so that the right
value is obtained even if this bit is set by the codec driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 07:47:52 +01:00
David Henningsson
504333df8b ALSA: usb - Don't trust the channel config if the channel count changed
In case the channel count of the input terminal is not the same as
the channel count of the streaming descriptor, the channel config of
the input terminal can not be trusted. Instead fall back to a default
(guessed) channel map.

This was found on a Logitech USB Headset.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 07:46:48 +01:00
David Henningsson
e3e35f750f ALSA: usb - For class 2 devices, use channel map from altsettings
The channel config from the streaming descriptor is probably a
better indicator of the channel map than the input terminal.
Use the input terminal's channel map as fallback only.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 07:46:38 +01:00
David Henningsson
0dca01c37a ALSA: usb: supply channel maps even when wChannelConfig is unspecified
If wChannelconfig is given for some formats but not others, userspace
might not be able to set the channel map.

This is RFC because I'm not sure what the best behaviour is - to guess
the channel map from the given number of channels (it's quite likely
that one channel is MONO and two channels is FL FR), or just to supply
UNKNOWN for all channels.

But the complete lack of channel map for a format leads userspace to
believe that the format is not available at all. Or am I
misunderstanding how this should be used?

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-05 07:46:15 +01:00
Takashi Iwai
24eff328f6 ALSA: hda - Enable SPDIF for Acer TravelMate 6293
BIOS on Acer TravelMate 6293 doesn't set up the SPDIF output pin
correctly as default, so enable it via a fixup entry.

Reported-and-tested-by: Hagen Heiduck <heiduck.suse@fmail.postpro.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-04 21:11:04 +01:00
James Ralston
4eeca499be ALSA: hda - Add Device IDs for Intel Wildcat Point-LP PCH
This patch adds the HD Audio Device IDs for the Intel Wildcat Point-LP PCH.

Signed-off-by: James Ralston <james.d.ralston@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-04 18:31:54 +01:00
Nicolin Chen
988e8cc41e ASoC: Add pinctrl PM to components of active DAIs
It's quite popular that more drivers are using pinctrl PM, for example:
(Documentation/devicetree/bindings/arm/primecell.txt). Just like what
runtime PM does, it would deactivate and activate pin group depending
on whether it's being used or not.

And this pinctrl PM might be also beneficial to cpu dai drivers because
they might have actual pinctrl so as to sleep their pins and wake them
up as needed.

To achieve this goal, this patch sets pins to the default state during
resume or startup; While during suspend and shutdown, it would set pins
to the sleep state.

As pinctrl PM would return zero if there is no such pinctrl sleep state
settings, this patch would not break current ASoC subsystem directly.

[ However, there is still an exception that the patch can not handle,
that is, when cpu dai driver does not have pinctrl property but another
device has it. (The AUDMUX <-> SSI on Freescale i.MX6 series for example.
SSI as a cpu dai doesn't contain pinctrl property while AUDMUX, an Audio
Multiplexer, has it). In this case, this kind of cpu dai driver needs to
find a way to obtain the pinctrl property as its own, by moving property
from AUDMUX to SSI, or creating a pins link/dependency between these two
devices, or using a more decent way after we figure it out. ]

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-04 09:08:59 -08:00
Fabio Estevam
9c1fc20913 ASoC: fsl: fsl_spdif: No need to check the return value of platform_get_resource()
When using devm_ioremap_resource(), we do not need to check the return value of
platform_get_resource(), so just remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-04 08:59:40 -08:00
Nariman Poushin
c01422a4a1 ASoC: wm_adsp: Interpret ADSP memory region lengths as 32 bit words
Pad the ADSP word (3 bytes) to 4 bytes in the kernel and calculate
lengths based on padded ADSP words instead of treating them as bytes

Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com>
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2013-11-04 08:57:25 -08:00
Mengdong Lin
300016b960 ALSA: hda - rename function not_share_unassigned_cvt()
The function name not_share_unassigned_cvt() is opposite to what it does.
This patch renames it to intel_not_share_assigned_cvt(), and addes comments
to explain why some Intel display codecs need this workaround.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-04 14:22:08 +01:00
Anssi Hannula
611885bc96 ALSA: hda - hdmi: Disallow unsupported 2ch remapping on NVIDIA codecs
NVIDIA HDMI codecs do not seem to follow the Audio Sample Packet (ASP)
channel mapping (as set by verb F32h per HDA specification 7.3.3.41)
when playing back 2-channel audio (CEA CA 0x00).

Basically this means that specifying swapped channels for stereo audio
(FR,FL) does not take effect, and e.g. this command plays back on the
wrong channel:
speaker-test -c2 -Dhdmi:CARD=NVidia,DEV=0 -m FR,FL -s1

Multichannel audio is not affected.

This issue has been confirmed to exist on codec 0x10de0015 by me and on
0x10de0040 by Juho Teperi.

Disable 2ch FL/FR channel swapping on all NVIDIA HDMI codecs that use
the standard HDA channel mapping system. Since this is a very minor
functionality loss, we err on the side of disabling it for newer codecs
as well until any future testing confirms that this issue has been
fixed.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Helped-by: Juho Teperi <juho.teperi@iki.fi>
Cc: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-04 10:10:28 +01:00
Takashi Iwai
fce762ed9f Merge branch 'for-linus' into for-next 2013-11-04 10:10:02 +01:00
Takashi Iwai
ebfe1068f9 ASoC: Final updates for v3.13
A few final updates for v3.13, all driver updates apart from some DPCM
 and Coverity fixes which should have minor impact on practical systems.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSdzlPAAoJELSic+t+oim9sn0QAJJuPBcCq2pJZE0nhacNeqx0
 YaDIEoNmSOutY7zdQ0/xtWazZOmn1CvxB6/vYPwhrXVqUSZPEuWWFeNsGoDNtOLJ
 9x+b7RfY+wN7P2CNgQaEx4kFix4TeGDTZ5eaViuqSFqgDYkSSmOHNh5G2DNT2yuu
 Jm1OzFfArSE+s29ezMK7Gn6FhfXUbtSOpOrewqFrua68E4B4zppD7b0PnTB4kOZ5
 LHBwarpE30VDt9e6jcJIxjtGVqV7xau50RBcsnKvCdtdh/UPmOW4VF9RqkeeYHIb
 dgqAEswE2i2g4QtK/ZxUrLgcGT/sBGuYMHRATlUuo052izFtXNNjgfHtz/Qr9Uxd
 N5d0Vf2HklTlS6VXNystvqSH7Tld3DFMEsGEk/PK4zPqHI8j4+3EpxlQLpUvipUV
 bLo2XubRXDcJ0Ej+0yi38lAQQVfKzdMJD+m6NdA2xrjX1nyCXPhINu+okIEdcY5K
 xqrSpx8DOGxJMTXR2RXa99JfmyhrJbAse9eSaEe/2hr04yafb+kRy3tLtjgv/zUo
 L/Z/oJPnC1dBE7sINwnHiLjJwQgEy91o9tWgioIa1MGg3Za3aQ3dMhBS5gXq3Zu+
 4dZM44RbyxVWq17TH8DQeaSaFg+nu/j/yOsB5Z33Z1M1Q1SjwaSbpZD2rccGb9kL
 95vxch8WBLIyPSvLN9A4
 =EOnb
 -----END PGP SIGNATURE-----

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

ASoC: Final updates for v3.13

A few final updates for v3.13, all driver updates apart from some DPCM
and Coverity fixes which should have minor impact on practical systems.
2013-11-04 10:05:07 +01:00
Mark Brown
71d0c3a876 Merge remote-tracking branch 'asoc/topic/wm8996' into asoc-next 2013-11-03 22:04:22 -08:00
Mark Brown
f027ac7a72 Merge remote-tracking branch 'asoc/topic/wm8962' into asoc-next 2013-11-03 22:04:22 -08:00
Mark Brown
1c2fa548bf Merge remote-tracking branch 'asoc/topic/wm0010' into asoc-next 2013-11-03 22:04:21 -08:00
Mark Brown
d092232793 Merge remote-tracking branch 'asoc/topic/samsung' into asoc-next 2013-11-03 22:04:20 -08:00
Mark Brown
4cf9159e2a Merge remote-tracking branch 'asoc/topic/rt5640' into asoc-next 2013-11-03 22:04:19 -08:00
Mark Brown
97fa413305 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next 2013-11-03 22:04:19 -08:00
Mark Brown
07ad822c21 Merge remote-tracking branch 'asoc/topic/ml26124' into asoc-next 2013-11-03 22:04:18 -08:00
Mark Brown
fc10c6db77 Merge remote-tracking branch 'asoc/topic/kirkwood' into asoc-next 2013-11-03 22:04:17 -08:00
Mark Brown
6caa9892c3 Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next 2013-11-03 22:04:17 -08:00
Mark Brown
911885542a Merge remote-tracking branch 'asoc/topic/dma' into asoc-next 2013-11-03 22:04:16 -08:00
Mark Brown
05e48b5064 Merge remote-tracking branch 'asoc/topic/cs42l52' into asoc-next 2013-11-03 22:04:16 -08:00
Mark Brown
e814e3936e Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2013-11-03 22:04:15 -08:00
Mark Brown
6367771fb6 Merge remote-tracking branch 'asoc/topic/arizona' into asoc-next 2013-11-03 22:04:14 -08:00