Commit graph

262958 commits

Author SHA1 Message Date
Daniel Mack 358e2bd4a9 ALSA: snd-usb: re-order the Makefile
Sort its entries in alphabetical order.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-14 17:07:01 +02:00
Daniel Mack 00137425fe USB: Add endpoint usage definitions to ch9.h
The endpoint usage field is described in the USB 2.0 specification,
chapter 9.6.6.

Also, move the sync type fields block down by some lines to reflect the
fact that these are also stuffed in bmAttributes.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-14 17:06:47 +02:00
David Henningsson 2e1210bc3d ALSA: HDA: Cirrus - fix "Surround Speaker" volume control name
This patch fixes "Surround Speaker Playback Volume" being cut off.
(Commit b4dabfc452 was probably meant to fix this, but it fixed
only the "Switch" name, not the "Volume" name.)

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-14 13:45:12 +02:00
Mark Brown 32d2a0c17d ASoC: Correct channel numbers for WM8996 AIF2
The AIF1 channels are numbered from zero than one; do the same thing for
AIF2 too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-14 11:00:07 +01:00
Mark Brown c83495af63 ASoC: Disable WM8996 CPVDD supply when not in use
The WM8996 only requires CPVDD when the charge pump is active so control
it separately to the other supplies, only enabling it when the charge pump
is active. This will result in a small power saving on systems which are
able to provide independent software control of the supply.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-14 10:59:36 +01:00
Mark Brown da07ecd93b regulator: Implement deferred disable support
It is a reasonably common pattern for hardware to require some delay after
being quiesced before the disable has finalised, especially in mixed signal
devices. For example, an active discharge may be required to ensure that
the circuit starts up again in a known state. Avoid having to implement
such delays in the regulator API by providing regulator_deferred_disable()
which will do a regulator_disable() a specified number of milliseconds
after it is called.

Due to the reference counting done on regulators a deferred disable can
be cancelled by doing another regulator_enable().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-14 10:58:23 +01:00
Clemens Ladisch dba8b46992 ALSA: mpu401: clean up interrupt specification
The semantics of snd_mpu401_uart_new()'s interrupt parameters are
somewhat counterintuitive:  To prevent the function from allocating its
own interrupt, either the irq number must be invalid, or the irq_flags
parameter must be zero.  At the same time, the irq parameter being
invalid specifies that the mpu401 code has to work without an interrupt
allocated by the caller.  This implies that, if there is an interrupt
and it is allocated by the caller, the irq parameter must be set to
a valid-looking number which then isn't actually used.

With the removal of IRQF_DISABLED, zero becomes a valid irq_flags value,
which forces us to handle the parameters differently.

This patch introduces a new flag MPU401_INFO_IRQ_HOOK for when the
device interrupt is handled by the caller, and makes the allocation of
the interrupt to depend only on the irq parameter.  As suggested by
Takashi, the irq_flags parameter was dropped because, when used, it had
the constant value IRQF_DISABLED.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-14 11:00:51 +02:00
Takashi Iwai 99e14c9d41 ALSA: hda - Terminate the recursive connection search properly
The recursive search of widget connections in snd_hda_get_conn_index()
must be terminated at the pin and the audio-out widgets.  Otherwise
you'll get "too deep connection" warnings unnecessarily.

Reported-by: Francis Moreau <francis.moro@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-13 10:33:16 +02:00
Arnd Bergmann 5013951be8 ASoC: Fix trivial build regression in Kirkwood I2S
A fix merged in 3.1-rc2 introduced a small regression, this should get it
to build again.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-12 11:48:12 +01:00
Axel Lin 47124373b5 ALSA: keywest: Remove obsolete cleanup for clientdata
The i2c core will clear the clientdata pointer automatically.
We don't have to set the `data' field to NULL in remove() or
if probe() failed anymore.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-12 10:36:12 +02:00
Axel Lin 5758960353 ALSA: aoa: Remove obsolete cleanup for clientdata
The i2c core will clear the clientdata pointer automatically.
We don't have to set the `data' field to NULL in remove() or
if probe() failed anymore.

Also remove a unneeded NULL checking for kfree.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-12 10:35:47 +02:00
Raymond Yau 89f3325a6e ALSA: ymfpci: add "Playback" to FM Legacy Volume control
YDSXGR_LEGACYOUTVOL is a Playback Volume control for OPL3 FM Synth.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-12 10:30:28 +02:00
Pierre-Louis Bossart 294c4fb8ab ALSA: usb: refine delay information with USB frame counter
Existing code only updates the audio delay when URBs were
submitted/retired. This can introduce an uncertainty of 8ms
on the number of samples played out with the default settings,
and a lot more when URBs convey more packets to reduce the
interrupt rate and power consumption.

This patch relies on the USB frame counter to reduce the
uncertainty to less than 2ms worst-case. The delay information
essentially becomes independent of the URB size and number of
packets. This should help applications like PulseAudio which
require accurate audio timing. Clemens Ladisch reported
a decrease of mplayer's A-V difference from nrpacks down to at
most 1ms.

Thanks to Clemens for also pointing out that the implementation
of frame counters varies between different HCDs. Only the
8 lowest-bits are used to estimate the delay.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
[clemens: changed debug code]
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-12 10:30:20 +02:00
Lars-Peter Clausen 30ab1e7886 ASoC: ad193x: Setup regmap read and write flag masks for SPI
Currently register read-back for the ad193x is broken, because it expects bit 0
of the upper byte to be set to indicate a read operation, while the regmap
default for SPI is to use bit 7.

This patch also addresses another oddity of the device. There are SPI and I2C
versions of this codec. In both cases the registers are 8-bit wide and numbered
from 0x0 to 0x10, but in the SPI case there is also a so called
'global address' which is prefixed in-front of the register address. The global
address mimics I2C behaviour and includes a static device address the and the
read/write flag. This basically extends the register address to an 16-bit value
numbered from 0x800 to 0x810. These are the register numbers which are
currently used by the driver. This works, because I2C will ignore the upper
8 bits of the register, but it is still a bit confusing, as there are no such
register numbers in the I2C case.

The approach taken by this patch is to number the registers from 0x00 to 0x10
and encode the global address for SPI mode into the read and write flag masks.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-09 11:13:31 -07:00
Mark Brown 4ae7335dae Merge branch 'topic/interface' of git://opensource.wolfsonmicro.com/regmap into for-3.2 2011-09-09 11:11:24 -07:00
Mark Brown 069af897f9 regmap: Provide device read and write map interface for merging
Add the externally visible interface introduced by Lars-Peter's commit
6f3064 (regmap: Add support for device specific write and read flag
masks) separately in order to allow merge into other subsystems for
integration with drivers.  Drivers relying on this feature will not be
functional until they are merged with the implementation.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-09 11:05:46 -07:00
Axel Lin 694741471b ASoC: playpaq_wm8510: Return proper error if clk_get fails
Return proper error instead of 0 if clk_get fails.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-09 09:42:00 -07:00
Lu Guanqun 283e42e011 ASoC: sst_platform: fix memory leak
snd_pcm_hw_constraint_integer() could return -1, in this case, sst platform is
not opened successfully.  However the corresponding close callback isn't able
to be called later on to release these two allocated memories, thus resulting
in memory leak.

This patch moves the check for hardware contraints earlier, thus resolving this
issue.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-08 15:43:03 -07:00
Lu Guanqun 22be504aaa ASoC: sst_platform: using builtin function
Use the builtin snd_soc_set_runtime_hwparams() instead of assigning it by
myself.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-08 15:43:03 -07:00
Lu Guanqun c2f6fce33e ASoC: sst_platform: trivial coding style fix
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-08 15:43:02 -07:00
Axel Lin 0f73644f37 ASoC: ad1980: Return proper error if vendor id mismatch
Return -ENODEV instead of 0 if vendor id mismatch.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-08 15:39:51 -07:00
Mark Brown 3ed464659a ASoC: Remove unused step size from debugfs CODEC write function
We don't use the step size so there's no need to work it out.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-08 15:38:18 -07:00
Axel Lin c8f4b7fd68 ASoC: alc5623: Remove unused mutex
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-05 18:15:15 -07:00
Mark Brown 27b6d92a24 ASoC: Check that WM8996 FLL started even if we don't have the IRQ
We can directly read the FLL lock status on WM8996 so even if we don't
have an interrupt wired up we can still verify that the FLL started
successfully.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-05 18:14:04 -07:00
Mark Brown 11323e3283 Merge branch 'for-3.1' into for-3.2 2011-09-05 18:13:31 -07:00
Axel Lin 4ed0d012c9 ASoC: Add missing platform_device_put in raumfeld_audio_init error path
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Daniel Mack <zonque@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-05 18:13:04 -07:00
Lars-Peter Clausen c5d2e650bd ASoC: Blackfin: bf5xx-ad193x: Fix codec device name
Fix the codec_name field of the dai_link to match the actual device name
of the codec. Otherwise the card won't be instantiated.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-09-05 18:11:29 -07:00
Mark Brown 747da0f80e ASoC: Fix reporting of partial jack updates
We need to report the entire jack state to the core jack code, not just
the bits that were being updated by the caller, otherwise the status
reported by other detection methods will be omitted from the state seen
by userspace.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-09-05 18:10:52 -07:00
Axel Lin 7b4615ba81 ASoC: sn95031: Fix the logic to find free channel
In the case of no free channel available,
current implementation returns 0 instead of negative errno.

This patch fixes the logic to return -EINVAL if no free channel available.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-04 08:53:39 -07:00
Mark Brown efd614ac06 Merge branch 'for-3.1' into for-3.2 2011-08-31 09:57:44 +01:00
Mark Brown da1c6ea6cf ASoC: Allow source specification for CODEC level sysclk
Similarly to PLLs/FLLs some modern CODECs provide selectable system clock
sources. When the clock is the clock for a DAI we do not usually need to
identify which clock is being configured so can use clk_id for the source
clock but with CODEC wide system clocks we will need to specify both the
clock being configured and the source.

Add a source argument to the CODEC driver set_sysclk() operation to
reflect this. As this operation is not as widely used as the DAI
set_sysclk() operation the change is not very invasive. We probably
ought to go and make the same alternation for DAIs at some point.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:57:35 +01:00
Mark Brown d2dd0540c1 ASoC: Add device tree binding for WM8804
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:52:57 +01:00
Mark Brown b6de431556 ASoC: Add device tree binding for WM8776
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:52:50 +01:00
Mark Brown 13c7d08f54 ASoC: Add device tree binding for WM8770
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:52:43 +01:00
Mark Brown 1e3ad571d5 ASoC: Remove redundant -codec from WM8776 driver name
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Timur Tabi <timur@freescale.com>
2011-08-31 09:52:24 +01:00
Mark Brown 9a810e959b ASoC: Remove unused mutex from WM9090 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:52:04 +01:00
Mark Brown 4a8923ba99 ASoC: Allow register defaults to be larger than unsigned short
Devices that need this exist; obviously the newer regmap defaults
mechanism will deal with this more happily.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:51:50 +01:00
Fabio Estevam 117ef9570b ASoC: imx: Fix build warning of unused 'card' variable
Fixes the following warning:

  CC      sound/soc/imx/imx-pcm-fiq.o
sound/soc/imx/imx-pcm-fiq.c: In function 'imx_pcm_fiq_new':
sound/soc/imx/imx-pcm-fiq.c:243: warning: unused variable 'card'
  CC      sound/soc/imx/imx-pcm-dma-mx2.o

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:48:13 +01:00
Lars-Peter Clausen b92d150bae ASoC: soc_codec_reg_show use snd_soc_codec_readable_register
Use snd_soc_codec_readable_register instead of open-coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:47:01 +01:00
Mark Brown 0f8dd4ce47 Merge branch 'for-3.1' into for-3.2 2011-08-31 09:46:42 +01:00
Lars-Peter Clausen 6c5b756aaa ASoC: Fix register cache sync register_writable WARN_ONs
Currently the condition for these WARN_ONs is reversed and they are placed
before the actual check whether we are going to write to that register. So if
the codec implements the register_writable callback we'll get a warning for each
writable register when syncing the register cache.

While we are at it change the check to use snd_soc_codec_writable_register
instead of open-coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:46:16 +01:00
Lars-Peter Clausen 63fa0a288c ASoC: snd_soc_codec_{readable,writable}_register change default to true
Change the default return value of snd_soc_codec_{readable,writable}_register to
true when no codec specific callback for this function is given. Otherwise all
registers of that codec will neither be readable nor writable, which is most
certainly not what we want.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:46:01 +01:00
Peter Ujfalusi 728a522224 ASoC: soc-dapm: Fix parameter comment for snd_soc_dapm_free
We have dapm_context instead of codec parameter.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:45:33 +01:00
Wolfram Sang 35dcf58634 ASoC: imx: use more robust checking of available streams
Replace the channels_min check with a check for the relevant substream
being present. Suggested here [1] when mxs implemented the
audio-support.

[1] http://www.spinics.net/lists/arm-kernel/msg133010.html

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:42:24 +01:00
Wolfram Sang d4ba7854c9 ASoC: imx-ssi: use dma_writecombine consistently
If the channel is allocated as writecombine, then mmaping it should also
use writecombine. Also, add a proper device for the call. Ported from a
similar fix for mach-mxs.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-31 09:42:08 +01:00
Mark Brown 59ec6da2e3 MAINTAINERS: Add some missed Wolfson files
Mostly input related.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-29 14:00:26 +01:00
susan gao 18a4eef3d5 ASoC: Add 3D stereo support for wm8996
My first patch to ASoC ever! If I did something wrong, blame Ian.

Signed-off-by: Susan Gao <sgao@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-29 10:11:31 +01:00
Ben Gardiner 0a9d138528 ASoC: davinci-mcasp: add support for unsigned PCM formats
Although the McASP supports sign-extending samples in RX or TX [1]; the
davinci-mcasp driver does not touch the {R,X}PBIT or {R,X}PAD field of the
{R,X}FMT registers meaning that the McASP will serialize the bytes it is given
regardless of their signedness. So supporting unsigned formats is as simple
as adding them to the metadata of the davinci-mcasp driver.

Update the FMTBITs reported in the snd_soc_dai_driver and also update the case
statements in davinci-mcasp's hw_params() function so that the McASP can be
connected to CODECs that use unsigned values.

[1] http://www.ti.com/lit/ug/sprufm1/sprufm1.pdf

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-29 10:11:17 +01:00
Kristian Amlie 1ef0e0a053 ALSA: usb-audio: add Starr Labs USB MIDI support
Add support for Starr Labs USB MIDI devices such as the Z7S, which are
based on an FTDI serial UART chip.

Based on a patch by Daniel Mack.

Signed-off-by: Kristian Amlie <kristian@amlie.name>
Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-26 14:12:34 +02:00
Takashi Iwai 26b9b559ed Merge branch 'fix/asoc' into for-linus 2011-08-26 09:29:43 +02:00