Commit Graph

15409 Commits

Author SHA1 Message Date
Linus Torvalds d0ff934881 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS fixes from Al Viro:
 "Several fixes + obvious cleanup (you've missed a couple of open-coded
  can_lookup() back then)"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  snd_pcm_link(): fix a leak...
  use can_lookup() instead of direct checks of ->i_op->lookup
  move exit_task_namespaces() outside of exit_notify()
  fput: task_work_add() can fail if the caller has passed exit_task_work()
  ncpfs: fix rmdir returns Device or resource busy
2013-06-14 19:18:56 -10:00
Al Viro dd6c5cd8fe snd_pcm_link(): fix a leak...
in case when snd_pcm_stream_linked(substream) is true, we end up leaking
group.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-06-15 05:42:42 +04:00
Mark Brown 902a75cdc4 Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus 2013-06-10 10:28:51 +01:00
Mark Brown 4351ac5b9f Merge remote-tracking branch 'asoc/fix/tlv320aic3x' into asoc-linus 2013-06-10 10:28:50 +01:00
Mark Brown ed75019204 Merge remote-tracking branch 'asoc/fix/cs42l52' into asoc-linus 2013-06-10 10:28:49 +01:00
Mark Brown 56f1275b85 Merge remote-tracking branch 'asoc/fix/core' into asoc-linus 2013-06-10 10:28:49 +01:00
Mark Brown 97e0002aab Merge remote-tracking branch 'asoc/fix/arizona' into asoc-linus 2013-06-10 10:28:48 +01:00
Andreas Irestål 2894770ec1 ASoC: tlv320aic3x: Remove deadlock from snd_soc_dapm_put_volsw_aic3x()
When calling snd_soc_dapm_sync(), it eventually tries to lock the same mutex
already locked in snd_soc_dapm_put_volsw_aic3x() and a deadlock occurs. By
moving the mutex unlock to just before snd_soc_dapm_sync(), this deadlock is
prevented. This problem was introduced in Linux 3.5

Signed-off-by: Andreas Irestål <Andreas.Irestal@axis.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-07 17:57:16 +01:00
Mark Brown 4616274d33 ASoC: dapm: Treat DAI widgets like AIF widgets for power
Even though they are virtual widgets DAI widgets still get counted for the
DAPM context power management so we can't just use the active state to
check if they should be powered as they may not be part of a complete path.

Instead split them into input and output widgets and do the same power
checks as we perform on AIFs.

Reported-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-07 15:54:50 +01:00
Charles Keepax ee4b7c7fe0 ASoC: arizona: Correct AEC loopback enable
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-05 15:45:42 +01:00
Takashi Iwai 11e7064f35 ALSA: usb-audio - Fix invalid volume resolution on Logitech HD webcam c270
USB audio driver spews an error message when probing Logitech HD
webcam c270:
  ALSA mixer.c:1300 usb_audio: Warning! Unlikely big volume range (=6144), cval->res is probably wrong.
  ALSA mixer.c:1304 usb_audio: [5] FU [Mic Capture Volume] ch = 1, val = 1536/7680/1

Obviously the device needs a fixed volume resolution (cval->res = 384)
like other Logitech devices.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=821735

Reported-and-tested-by: Cristian Rodríguez <crrodriguez@opensuse.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-05 08:35:26 +02:00
Takashi Iwai 8eafc0a161 ALSA: usb-audio - Apply Logitech QuickCam Pro 9000 quirk only to audio iface
... instead of applying to all interfaces.

Reference: http://forums.gentoo.org/viewtopic-p-6886404.html

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-04 16:07:48 +02:00
Takashi Iwai 963afde950 ALSA: hda/via - Clean up duplicated codes
The previous commit was written in the way to make the backport to
3.9.y easier, and left the duplicated open codes intentionally.
Now let's clean up the duplicated codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-03 11:34:00 +02:00
Takashi Iwai 5a6f294e87 ALSA: hda/via - Fix wrongly cleared pins after suspend on VT1802
VIA driver has a special suspend handling only for VT1802 to reduce
the pop noise.  During the transition to the generic parser, the
behavior of snd_hda_set_pin_ctl() was also changed to modify the
cached values, too.  And this caused a regression where the pin is
still cleared even after the resume (including the resume from power
save), resulting in the silent output.

The fix is simply to replace snd_hda_set_pin_ctl() with the explicit
call of snd_hda_codec_write() again.

Reported-by: Alex Riesen <raa.lkml@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-03 11:33:16 +02:00
Takashi Iwai 05909d5c67 ALSA: hda - Add keep_eapd_on flag to generic parser
VT1802 codec seems to reset EAPD of other pins in the hardware level,
and this was another reason of the silent headphone output on some
machines.  As a workaround, introduce a new flag indicating to keep
the EPAD on to the generic parser, and set it in patch_via.c.

Reported-by: Alex Riesen <raa.lkml@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-03 11:33:06 +02:00
Takashi Iwai 77afe0e948 ALSA: hda - Allow setting automute/automic hooks after parsing
Some codec drivers (VIA codecs and some Realtek fixups) set the
automute and automic hooks after calling
snd_hda_gen_parse_auto_config().  In the current code, the hook
pointers are referred only in snd_hda_gen_parse_auto_config() and
passed to snd_hda_jack_detect_enable_callback(), thus changing the
hook values won't change the actually called callbacks properly.

This patch fixes this bug by setting the static functions as the
primary callback functions for the jack detection, and let them
calling the appropriate hooks dynamically.

Cc: <stable@vger.kernel.org> [v3.9]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-03 11:33:06 +02:00
Takashi Iwai 087c2e3b4e ALSA: hda/via - Disable broken dynamic power control
Since the transition to the generic parser, the actual routes used
there don't match always with the assumed static paths in some
set_widgets_power_state callbacks.  This results in the wrong power
setup in the end.  As a temporary workaround, we need to disable the
calls together with the non-functional dynamic power control enum.

Reported-by: Alex Riesen <raa.lkml@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-03 11:32:55 +02:00
Mark Brown 056790923e ASoC: pcm: Require both CODEC and CPU support when declaring stream caps
When declaring playback and capture capabilities check for both CODEC
side and CPU side support rather than only checking for CODEC side
support.  While it is unusual some CPUs do have unidirectional DAIs.

Reported-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2013-06-03 09:55:00 +01:00
Clemens Ladisch a0c6d309c6 ALSA: usb-audio: fix Roland/Cakewalk UM-3G support
Commit 927c9423dd (ALSA: usb-audio: add
Edirol UM-3G support) used a wrong quirk type, which would make the
driver refuse to attach with the error message "MIDIStreaming interface
descriptor not found".

Cc: <stable@vger.kernel.org> # 3.3 and later
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-06-03 09:42:21 +02:00
David Henningsson 3ee2102fbe ALSA: hda - Add headset quirk for two Dell machines
This quirk is required for the headset mic to work on these
two machines.

BugLink: https://bugs.launchpad.net/bugs/1186170
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-31 10:45:26 +02:00
Ebben Aries 6b4dc2bd7e ALSA: hda - add dock support for Thinkpad T431s
Add a model/fixup string "lenovo-dock", for Thinkpad T431s, to allow sound in docking station.

Tested on Lenovo T431s with ThinkPad Mini Dock Plus Series 3

Signed-off-by: Ebben Aries <earies@dscp.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-31 08:19:46 +02:00
Wei Yongjun 8b1dacb6ae ALSA: sis7019: fix error return code in sis_chip_create()
Fix to return a negative error code in the pci_set_dma_mask() error
handling case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-31 08:19:12 +02:00
Mark Brown 7afce3f5e5 ASoC: wm8994: Ensure microphone detection state is reset on removal
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 13:47:46 +01:00
Mark Brown 9e43088bb0 ASoC: wm8994: Avoid leaking pm_runtime reference on removed jack race
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30 12:10:02 +01:00
Nicolas Schichan 7d8acf2cba ASoC: cs42l52: fix hp_gain_enum shift value.
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-29 19:24:39 +01:00
Nicolas Schichan 8ac60a6866 ASoC: cs42l52: use correct PCM mixer TLV dB scale to match datasheet.
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-29 19:24:36 +01:00
Takashi Iwai 8a90bb5116 ASoC: Updates for v3.10
A series of driver specific updates, none particularly critical, plus
 one fix to the compressed API code to handle capture streams properly
 which is very safe for mainline as there's no current users.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRpMLdAAoJELSic+t+oim9V+MP/R8NwuY9wNXuLRgnPQFTKJoH
 oLNKgVmOKKI43Z6zNNH4kh+HJX0N+kcWDZpu0L6hmXFfy/dUUyYrO8B4GG1FEnC8
 rMlnR1Tgie9yRVXDou9V9XH9itjjXCSJZs7fD/CNgcAJgu7pnTUrsj2Rd2KDHlwD
 pkLzxl5wJWbdvC1ESGK5DqVLPL/S7jRK/3nHZ1635O9BmpimvOPnttqVoNo5XqC4
 ld3piAgizAyWLsVOowVdVvOl0UHSLCRZbhr0xHKpaWO4x92GI9KI/C5EOLrInQFp
 ieS6369GKDMROX9vymNKDqnhM78ZpRQLMzVEqHFjAnroiUbtAkubmhtWpv6Gr+Vn
 RT9adGs6Z75QwJ6je3FW8kE2x8yFnlcOnaSgD3YToOa6BFfDn/EYxRijrTt1jfTa
 RrEQDosyKzsZPiT+GymzcRb9Zj5ir+37xijpNcWyYG8ToX/K6Od/fgNT2uRNmAQt
 0NKdV5Qjg0oIc+E2w/NuLYI5jG7K83NnX1IPZVzqzBWAcibSRHHKrmhSE142SNP+
 T+avVIaoZ0q7J115vtrmbxTHKNPpwElDW9UAQse3PVIvd4CdQzg9bgWhQmReb6KY
 keN0+ul1SiCWPBqQ8DlYMbRkxDftgGUauRmhGdq8y9FLleLQ33Ckt1DFlMBVONIl
 2ZvNO1xHxfZQU7SS1xiv
 =BZaD
 -----END PGP SIGNATURE-----

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

ASoC: Updates for v3.10

A series of driver specific updates, none particularly critical, plus
one fix to the compressed API code to handle capture streams properly
which is very safe for mainline as there's no current users.
2013-05-29 12:52:16 +02:00
Mark Brown 1ab9ecc248 Merge remote-tracking branch 'asoc/fix/wm8994' into asoc-linus 2013-05-28 15:41:37 +01:00
Mark Brown 9f1b2556c5 Merge remote-tracking branch 'asoc/fix/max98090' into asoc-linus 2013-05-28 15:41:36 +01:00
Mark Brown 72322e6362 Merge remote-tracking branch 'asoc/fix/davinci' into asoc-linus 2013-05-28 15:41:36 +01:00
Mark Brown 7ae3433628 Merge remote-tracking branch 'asoc/fix/cs42l52' into asoc-linus 2013-05-28 15:41:35 +01:00
Mark Brown d63aaee1fe Merge remote-tracking branch 'asoc/fix/compress' into asoc-linus 2013-05-28 15:41:35 +01:00
Mark Brown c6859959fc Merge remote-tracking branch 'asoc/fix/arizona' into asoc-linus 2013-05-28 15:41:34 +01:00
Nicolas Schichan 04d245b789 ASoC: cs42l52: fix default value for MASTERA_VOL.
The default register value for MASTERA_VOL is 0x00, the same as
MASTERB_VOL.

Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-05-28 15:40:50 +01:00
Vinod Koul 7d6898be8d ASoC: wm8994: check for array index returned
The array 'drc_cfg' of size 3 may use index value -22 (EINVAL)
The array 'retune_mobile_cfg' of size 3 may use index value -22 (EINVAL)

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-28 15:36:45 +01:00
Mark Brown 9767a58b8b ASoC: wm8994: Fix reporting of accessory removal on WM8958
During recent refactoring the code to report removal when MICDET reports
an absent microphone was removed, causing problems for systems which rely
solely on the MICDET for this functionality. Restore it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-28 10:22:36 -04:00
Vinod Koul d3134e211e ASoC: wm8994: use the correct pointer to get the control value
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-28 10:10:09 -04:00
Charles Keepax 39d4ecdb71 ASoC: wm5110: Correct DSP4R Mixer control name
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2013-05-25 09:29:10 -05:00
Torsten Schenk d47333ddb2 ALSA: usb-6fire: Modify firmware version check
Check only the uppermost 16 bits instead of the whole 32 bits of
the version information. Do this because all firmware version tested
with this version information worked correctly and the strict check
causes problems for several users.

Signed-off-by: Torsten Schenk <torsten.schenk@zoho.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-23 14:30:26 +02:00
Nicolas Schichan 40e2516acb ASoC: cs42l52: fix master playback mute mask.
The mask should define the bits to change in the register, not the
bits to preserve.

This fixes the inadvertent changes of the "Headphone Analog Gain"
value during mute/unmute.

Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-22 13:37:07 -05:00
Nicolas Schichan 99674c721f ASoC: cs42l52: fix bogus shifts in "Speaker Volume" and "PCM Mixer Volume" controls.
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-22 13:37:02 -05:00
Nicolas Schichan 0b6e81d165 ASoC: cs42l52: microphone bias is controlled by IFACE_CTL2 register.
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-22 13:36:38 -05:00
Daniel Mack 7967189251 ASoC: davinci: fix sample rotation
McASP serial audio engine needs different rotation values on TX and RX
channels. Commit dde109fb46 ("ASoC: McASP: Fix data rotation for
playback. Enables 24bit audio playback") changed the calculation to fix
the playback format, but broke the capture stream by doing it for both
TXFMT and RXFMT.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org [3.9 only]
2013-05-21 13:21:09 -05:00
Mark Brown 62cc4d595f ASoC: wm5110: Add missing speaker initialisation
Add callback to initialise the speaker in the core following the recent
changes to handling of integration with the thermal interrupts.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-20 11:33:51 -05:00
Charles Keepax 2c071ed7c3 ASoC: soc-compress: Send correct stream event for capture start
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-20 08:01:48 -05:00
Andrew Bresticker 3d15aacbb8 ASoC: max98090: request IRQF_ONESHOT interrupt
request_threaded_irq() rejects calls which both do not specify a handler
(indicating that the primary IRQ handler should be used) and do not set
IRQF_ONESHOT because the combination is unsafe with level-triggered
interrupts.  It is safe in this case, though, since max98090 IRQs are
edge-triggered and the interrupts aren't ACK'ed until the codec's IRQ
status register is read.  Because of this, an IRQF_ONESHOT interrupt
doesn't really make a difference, but request one anyway in order to make
request_threaded_irq() happy.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-20 13:58:49 +01:00
Linus Torvalds e51066824a Merge branch 'devm_no_resource_check' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull devm usage cleanup from Wolfram Sang:
 "Lately, I have been experimenting how to improve the devm interface to
  make writing device drivers easier and less error prone while also
  getting rid of its subtle issues.  I think it has more potential but
  still needs work and definately conistency, especiall in its usage.

  The first thing I come up with is a low hanging fruit regarding
  devm_ioremap_resouce().  This function already checks if the passed
  resource is valid and gives an error message if not.  So, we can
  remove similar checks from the drivers and get rid of a bit of code
  and a number of inconsistent error strings.

  This series only removes the unneeded check iff devm_ioremap_resource
  follows platform_get_resource directly.  The previous version tried to
  shuffle code if needed, too, what lead to an embarrasing bug.  It
  turned out to me that shuffling code for all cases found will make the
  automated script too complex, so I am unsure if an automated cleanup
  is the proper tool for this case.  Removing the easy stuff seems
  worthwhile to me, though.

  Despite various architectures and platform dependencies, I managed to
  compile test 45 out of 57 modified files locally using heuristics and
  defconfigs."

Pulled because: 296 deletions, 0 additions.

* 'devm_no_resource_check' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (33 commits)
  sound/soc/kirkwood: don't check resource with devm_ioremap_resource
  sound/soc/fsl: don't check resource with devm_ioremap_resource
  arch/mips/lantiq/xway: don't check resource with devm_ioremap_resource
  arch/arm/plat-samsung: don't check resource with devm_ioremap_resource
  arch/arm/mach-tegra: don't check resource with devm_ioremap_resource
  drivers/watchdog: don't check resource with devm_ioremap_resource
  drivers/w1/masters: don't check resource with devm_ioremap_resource
  drivers/video/omap2/dss: don't check resource with devm_ioremap_resource
  drivers/video/omap2: don't check resource with devm_ioremap_resource
  drivers/usb/phy: don't check resource with devm_ioremap_resource
  drivers/usb/host: don't check resource with devm_ioremap_resource
  drivers/usb/gadget: don't check resource with devm_ioremap_resource
  drivers/usb/chipidea: don't check resource with devm_ioremap_resource
  drivers/thermal: don't check resource with devm_ioremap_resource
  drivers/staging/nvec: don't check resource with devm_ioremap_resource
  drivers/staging/dwc2: don't check resource with devm_ioremap_resource
  drivers/spi: don't check resource with devm_ioremap_resource
  drivers/rtc: don't check resource with devm_ioremap_resource
  drivers/pwm: don't check resource with devm_ioremap_resource
  drivers/pinctrl: don't check resource with devm_ioremap_resource
  ...
2013-05-18 10:54:54 -07:00
Wolfram Sang 12716cd44d sound/soc/kirkwood: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-05-18 11:59:45 +02:00
Wolfram Sang 5f68d04d39 sound/soc/fsl: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-05-18 11:59:44 +02:00
Torstein Hegge e6135fe960 ALSA: usb-audio: proc: use found syncmaxsize to determine feedback format
freqshift is only set for the data endpoint and syncmaxsize is only set
for the sync endpoint. This results in a syncmaxsize of zero used in the
proc output feedback format calculation, which gives a feedback format
incorrectly shown as 8.16 for UAC2 devices.

As neither the data nor the sync endpoint gives all the relevant
content, output the two combined.

Also remove the sync_endpoint "packet size" which is always zero
and the sync_endpoint "momentary freq" which is constant.

Tested with UAC2 async and UAC1 adaptive, not tested with UAC1 async.

Reported-by: B. Zhang <bb.zhang@free.fr>
Signed-off-by: Torstein Hegge <hegge@resisty.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-17 08:05:34 +02:00