Commit Graph

17470 Commits

Author SHA1 Message Date
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
Mark Brown fa69b0f93e ASoC: ad1836: Use params_width() rather than explicit memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2014-01-09 13:59:15 +00:00
Markus Pargmann d7fa710423 ASoC: fsl-ssi: Fix stats compile warning
single_open requires a function with signature
'int (*)(struct seq_file *, void *)'. This patch fixes the warning by
fixing the wrong return type of fsl_ssi_stats_show.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 13:54:59 +00:00
Charles Keepax 18b1a902ad ASoC: wm_adsp: Mark wm_adsp2_boot_work as static
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-09 13:51:40 +00:00
Takashi Iwai 2d82ea2005 ALSA: Merge memalloc code into snd-pcm module
Instead of keeping a separate snd-page-alloc module, merge into the
core snd-pcm module, as we don't need to keep it as an individual
module due to the drop of page reservation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09 08:12:57 +01:00
Takashi Iwai f5d8e6df4b ALSA: Remove superfluous header inclusions in memalloc.c
After cutting off the proc and page reservation codes, we don't need
many headers any longer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09 07:44:11 +01:00
Takashi Iwai 47d98c026e ALSA: Remove memory reservation code from memalloc helper
Nowadays we have CMA for obtaining the contiguous memory pages
efficiently.  Let's kill the old kludge for reserving the memory pages
for large buffers.  It was rarely useful (only for preserving pages
among module reloading or a little help by an early boot scripting),
used only by a couple of drivers, and yet it gives too much ugliness
than its benefit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09 07:32:10 +01:00
Takashi Iwai d7b135410e ALSA: Remove memory accounting in memalloc helper
It's almost superfluous, and doesn't help much for real uses.
Let's reduce the layer size.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09 07:32:05 +01:00
Mengdong Lin 75dcbe4dc2 ALSA: hda/hdmi - apply all Haswell fix-ups to Broadwell display codec
Broadwell and Haswell have the same behavior on display audio. So this patch
defines is_haswell_plus() to include codecs for both Haswell and its successor
Broadwell, and apply all Haswell fix-ups to Broadwell.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09 07:30:17 +01:00
Mengdong Lin 3adadd280a ALSA: hda - add codec ID for Broadwell display audio codec
This patch adds codec ID (0x80862808) and module alias for Broadwell
display codec.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09 07:30:02 +01:00
Mengdong Lin 862d761818 ALSA: hda - add device ID for Broadwell display audio controller
This patch adds the device ID for Intel Broadwell display HD-Audio controller,
and applies Haswell properties to this device.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09 07:29:42 +01:00
Takashi Iwai 053ad6a057 ASoC: bcm: Remove obsoleted Kconfig dependency
CONFIG_SND_SOC_DMAENGINE_PCM was renamed to CONFIG_SND_DMAENGINE_PCM
recently.  And yet we don't have to select it since
CONFIG_SND_GENERIC_DMAENGINE_PCM selects the dependency by itself, so
just rip it off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Florian Meier <florian.meier@koalo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 20:00:04 +00:00
Charles Keepax 12db5edd69 ASoC: wm_adsp: Start DSP booting earlier in the DAPM process
Move the start of booting the DSP to earlier in the DAPM process, and
move the final starting of the DSP to later in the DAPM process. This
allows us to overlap some of the processing with other components of the
system being brought up.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 18:17:37 +00:00
Charles Keepax d8a64d6ade ASoC: wm_adsp: Factor out ADSP2 boot proceedure
Move the ADSP2 boot proceedure into a work structure in preparation for
running it asynchronously with the reset of the audio path bring up.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 18:17:37 +00:00
Markus Pargmann a5a7ee7c98 ASoC: fsl-ssi: Drop ac97 specific trigger function
The normal trigger function can now be used for AC97. Drop AC97 trigger
function.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:20:32 +00:00
Markus Pargmann 6de8387905 ASoC: fsl-ssi: Move RX/TX configuration to seperate functions
This patch defines the appropriate register values for different
oparation modes and IP versions. We have to handle DMA/FIQ, AC97,
DEBUG-IRQs and offline/online configuration support.

With this patch we cleanup some driver code that was not reference
manual conform and try to cleanup the whole trigger function to seperate
the actual register values from the enable/disable logic, which is now
hidden in fsl_ssi_config helpers.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:20:32 +00:00
Markus Pargmann 4e6ec0d98c ASoC: fsl-ssi: Add configuration helper functions
This patch adds a struct 'fsl_ssi_rxtx_reg_val' which holds register
values necessary to enable rx/tx. Based on those preset register values,
the added configuration functions will cleanly enable/disable different
parts of the SSI IP while supporting online/offline configuration.
Different operating modes can be setup directly as different register
values in fsl_ssi_reg_val.

These functions and structs will help to cleanup and simplify the
trigger function to support many different IP versions (online/offline
configuration) and different operating modes.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:20:32 +00:00
Markus Pargmann bd3ca7d1b8 ASoC: fsl-ssi: Add offline_config flag
imx50-ssi and later versions of this IP support online reconfiguration
of all registers. The reference manual does not list any registers that
can only be configured while the SSI unit is disabled. This patch
introduces the flag for later use.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:20:32 +00:00
Markus Pargmann 0888efd166 ASoC: fsl-ssi: Fix interrupt stats for imx
irqs should only be requested/released with enabled DMA. Previously
interrupt statistics where disabled for IMX Processors because of
different writeable SISR bits.

This patch introduces support for irqstats on imx processors again by
creating a sisr writeback mask and introducing a imx35-ssi compatible.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:20:31 +00:00
Markus Pargmann c1953bfe13 ASoC: fsl-ssi: Add imx51-ssi and of_device_id matching
There is a small but significant difference between imx21-ssi and
imx51-ssi and above. imx21-ssi does not allow online reconfiguration of
some registers. They have to be configured at the beginning.

imx51-ssi has to reconfigure the SSI unit while it is running. Otherwise
it would not be possible to have two streams in parallel. The new SDMA
unit in imx51 and above has to be configured before the first DMA
request arrives. Therefor we need to setup TDMAE/RDMAE just before
starting the stream.

This patch introduces distinct imx51-ssi as compatible and adds
of_device_id matching in the probe function.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:20:31 +00:00
Markus Pargmann 9368acc438 ASoC: fsl-ssi: Move sysfs stats to debugfs
Interrupt statistics of fsl_ssi are mainly for debugging purpose. Most
of those interrupts show error states, e.g. under/overflow.
The stats should be exposed via debugfs instead of sysfs.

This patch moves the statistics file to debugfs.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:18:30 +00:00
Markus Pargmann 2841be9afa ASoC: fsl-ssi: Fix probe error handling
This patch fixes the error handling in the fsl-ssi probe function.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 17:18:30 +00:00
Takashi Iwai b317b032d2 ALSA: hda - Split Thinkpad ACPI-related code
Both patch_realtek.c and patch_conexant.c contain the fairy same code
snippet for supporting Thinkpad ACPI LED controls.  Split them into
thinkpad_helper.c and include it from both places.  Although this
isn't the best approach from the code size POV, the probability for
coexistence of both Realtek and Conexant codecs on a single machine is
pretty low, thus it'll end up with less memory footprint than
splitting to yet another module.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08 16:16:51 +01:00
Andreas Pretzsch 7ae2b55b01 ASoC: ssm2602: add 16kHz sampling rate support
SSM260x also supports 16kHz with external master clocks of 12.000MHz,
12.288MHz and 18.432MHz.
Add matching coefficients, update constraints and announced rates.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:51:12 +00:00
Peter Ujfalusi b703b50485 ASoC: twl4030: Pass the twl4030_priv directly to twl4030_can_write_to_chip()
To avoid another lookup for the twl4030_priv in there.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Peter Ujfalusi a450aa6f50 ASoC: twl4030: Move the ctl cache update local to twl4030_write() function
There's no other users of this functionality, the code can be moved inside
of twl4030_write.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Peter Ujfalusi 7ded5fe020 ASoC: twl4030: Parameter alignment fixes (for code consistency)
Over time the multi line alignment got messed up. Correct them in one go
so the code will look consistent.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Peter Ujfalusi efc8acff1f ASoC: twl4030: Remove local reg cache
Depend on the regmap reg cache implementation for register caching done in
the twl-core driver.
The local register cache can be removed and we can keep only shadow copies
of certain ctl registers for pop noise reduction.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Peter Ujfalusi 8b3bca2966 ASoC: twl4030: Introduce local ctl register cache
Few registers need to be cached in the codec driver level. These registers
should only be written when the path is active to avoid pop noise on the
given path.
This patch adds an array which covers the range where the sensitive registers
are located and uppon loadinf the driver the ctl cache will be initialized.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Peter Ujfalusi 0dc41562a4 ASoC: twl4030: Remove reset registers functionality
The register states now tracked by the regmap implementation in the core which
makes the reset registers functionality 'redundant' since we know the state
of the registers now all the time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Peter Ujfalusi 7bfbdfea57 ASoC: twl4030: Remove check defaults functionality
No need to keep the check defaults functionality anymore.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Peter Ujfalusi a8fc415c29 ASoC: twl4030: Separate write condition checking from I/O function
Simplifies the code a bit and prepares it to the removal of local caching.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:48:53 +00:00
Xiubo Li 633ff8f8a4 ASoC: fsl-sai: Clean up the code
Makes the code slightly shorter.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:24:01 +00:00
Wei Yongjun 7ee4518ab7 ASoC: ux500: Fix sparse non static symbol warning
Fixes the following sparse warning:

sound/soc/ux500/ux500_msp_i2s.c:649:5: warning:
 symbol 'ux500_msp_i2s_of_init_msp' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:22:18 +00:00
Lars-Peter Clausen e20970ada3 ASoC: adau1701: Fix ADAU1701_SEROCTL_WORD_LEN_16 constant
The driver defines ADAU1701_SEROCTL_WORD_LEN_16 as 0x10 while it should be b10,
so 0x2. This patch fixes it.

Reported-by: Magnus Reftel <magnus.reftel@lockless.no>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
2014-01-08 12:10:50 +00:00
Liam Girdwood b893ea5f1c ASoC: sapm: Automatically connect DAI link widgets in DAPM graph.
Connect the DAPM graph through each BE DAI link to the componnent(s) on the
other side of the BE DAI link. This allows the graph to be walked on
both sides of the link when graph changes are made.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:07:18 +00:00
Liam Girdwood bece9e957c ASoC: utils: Add internal call to determine if DAI is dummy.
Provide a quick way to tell if a DAI is a dummy DAI or a regular DAI.
This is for internal DAPM usage only and is used to determine whether to
insert a DAI link connection into the DAPM graph.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:07:13 +00:00
Takashi Iwai 43a8e50a46 ALSA: hda - Don't create duplicated ctls for loopback paths
AD1986A mic pins (0x1d and 0x1f) share the same widget for controlling
the loopback volume/mute, but the generic parser didn't check it.
This ended up with the duplicated controls for the same effect.

This patch adds the check of the duplication for avoiding it.

After this fix, there will be only one control although it affects
both paths; this remaining issue should be fixed later in a different
patch.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08 09:59:41 +01:00
Takashi Iwai ed0e0d0617 ALSA: hda - Correct AD1986A 3stack pin configs
The 3stack pin configs for AD1986A codec had incorrect values that
resulted in broken mic and line-in.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08 09:59:32 +01:00
Takashi Iwai 8e3ae6f7ad ALSA: hda - Add consistent tag names for firmware patch
Some tags used in the firmware patch file are inconsistent with hwdep
sysfs file names, such as, the firmware patch takes [hint] tag while
sysfs file is */hints.  This makes even me referring back to the
document often.  Let's provide the same tag names as sysfs for
reducing confusions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08 09:59:23 +01:00
Takashi Iwai d81e397c65 ALSA: hda - firmware patch code cleanup
Just a code refactoring: the need_codec flag in hda_patch_item struct
can be removed by checking the current mode instead.  No functional
change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08 09:59:00 +01:00
Takashi Iwai 7546abfb8e ALSA: hda - Increment default stream numbers for AMD HDMI controllers
It turned out that some AMD HDMI controllers still don't provide
proper values in GCAP register (all zero), and the driver assigns only
one stream in that case, although the connected codec chip supports
more than one stream.

In this patch, the default max number of streams for AMD HDMI
controllers is increased to 8, which  should suffice for most use
cases.  The overhead by this increase is more azx_dev struct and BDL
allocations, so it's negligible.  Of course, if the controller
provides a proper GCAP register, the register value would be used.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08 09:58:30 +01:00
Takashi Iwai 58c57cfa0d ALSA: hda - Minor code optimization for patch_realtek.c
No functional change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-08 09:57:41 +01:00
Liam Girdwood 1e9de42f43 ASoC: dpcm: Explicitly set BE DAI link supported stream directions
Some BE DAIs can be "dummy" (when the DSP is controlling the DAI) and as such
wont have set a minimum number of playback or capture channels required for BE
DAI registration (to establish supported stream directions).

Force machine drivers to explicitly set whether they support playback and capture
stream directions for every BE DAIs.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 17:57:48 +00:00
Jean-Francois Moine dcf0fa27a5 ASoC: pcm: Fix lack of platform bespoke_trigger() call
When the platform driver has no ops, the platform function
bespoke_trigger() is no more called.

The problem was introduced by the commit c5914b0aae
	"ASoC: pcm: Check for ops before deferencing them"

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 17:11:07 +00:00
Xiubo Li 8c0b8230b2 ASoC: simple-card: keep the property's name the same pattern
Even though we might not have rigor rule for the simple card property names,
according to the existing ones, they are all in a same pattern:

[simple-audio-card,]XXX;

Rename simple-audio-routing to simple-audio-card,routing, and make the simple
card's properties has one unified name.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:43:13 +00:00
Xiubo Li f87a3e825c ASoC: simple-card: fix the DAPM routes map parsing
The simple-card's DAPM route maping is optional.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:43:13 +00:00
Lee Jones 33899b1985 ASoC: ux500: Dramatically reduce the size of the DAI driver data struct
We no longer have a means to differentiate between MSP devices at probe
time, mainly because we don't really have to. So rather than have an over-
sized static data structure in place, where the only difference between
devices is the ID and name (which are unused), we'll just create one
succinct, statically assigned and shared one instead.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:20 +00:00
Lee Jones 86a3fdfc63 ASoC: ux500_pcm: Differentiate between pdata and DT initialisation
If booting with full DT support (i.e. DMA too, the last piece of the
puzzle), then we don't need to use the compatible_request_channel call
back or require some of the historical bumph which probably isn't
required by a platform data start-up now either. This will also be
ripped out in upcoming commits.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:20 +00:00
Lee Jones ead20611a2 ASoC: ux500_pcm: Take out pointless dev_dbg() call
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:20 +00:00
Lee Jones f382acbe16 ASoC: ux500: Store DMA data in the DAI differently in the pdata and DT case
In this patch we do two things. Firstly, instead of open coding the
store of DMA data in to the DAI for later use, we use the API provided.
Secondly we create and store similar DMA data for the DT case, only
this time we use 'struct snd_dmaengine_dai_dma_data' which is provided
by the core for this very reason.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:20 +00:00
Lee Jones 05c56c2413 ASoC: ux500_pcm: Extend Device Tree support to deal with DMA data
Soon we will strip out pdata support from the Ux500 set of ASoC drivers.
When this happens it will have to supply a DMA slave_config to the
dmaengine. At the moment a great deal of this comes from pdata via
AUXDATA. We need to become independent of this soon. This patch starts
the process by allocating memory for the associated data structures and
fetches the MSP id used for const struct indexing.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:20 +00:00
Lee Jones f6c377520c ASoC: ux500_pcm: Expect different saved DMA data when obtaining from DAI store
In preparation for full Device Tree enablement we must differentiate
between the two varying ways DMA data can be held in the DAI store. If
we're booting with Device Tree the provided 'snd_dmaengine_dai_dma_data'
data structure shall be used, whereas in order to avoid breaking legacy
platform data we also need to be able to translate DMA data stored using
the UX500 specific 'ux500_msp_dma_params' method.

Once we move over to solely use Device Tree, we can enforce the use of
'snd_dmaengine_dai_dma_data' and this code can be removed altogether.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:20 +00:00
Lee Jones 609a3050b8 ASoC: ux500_pcm: Stop pretending that we support varying address widths
The Slave Config's addr_width attribute is populated by data_width of
dma_cfg, which in turn is derived from dma_params' data_size attribute
and that comes from the slot_width which is always 16 bits (2 Bytes).
We're cutting out the middle man here and just setting the DMA Slave
Config directly.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:19 +00:00
Lee Jones ae276e93b8 ASoC: Ux500: Match platform by device node when booting Device Tree
We're getting closer to fully enabling the Ux500 ASoC driver for Device
Tree. When we switch over from using AUXDATA we'll need to match platform
by only Device Tree nodes. In this patch we NULL out the platform_name,
and supply nodes for each platform device.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:19 +00:00
Lee Jones a61f9e314a ASoC: ux500: Provide better checking for Device Tree and/or Platform Data
These drivers will not work without platform specific data, which is
passed in via Device Tree or Platform Data. To avoid the chance of
NULL pointer dereferencing and alike, let's ensure we have at least
one of the methods in play before continuing.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:37:19 +00:00
Lee Jones 0475680b5c ARM: ux500: Don't use enums for MSP IDs - for easy DT conversion
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 15:36:09 +00:00
Lars-Peter Clausen 96ae0f08ac ASoC: mxs: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag
Since commit 7b11304 ("dma: mxs-dma: Report correct residue for cyclic DMA")
the mxs dmaengine driver has support for residue reporting. So there is no need
to specify the SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag anymore. This allows a
finer grained resolution for the PCM pointer as well as avoids the race
condition that can occur with the period counting that is used when the
dmaengine driver does not support residue reporting.

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-07 11:41:36 +00:00
Lars-Peter Clausen f3b6079683 ASoC: mxs: 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>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 11:41:32 +00:00
Lars-Peter Clausen b0a23b8b36 ASoC: fsl: 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>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 11:40:24 +00:00
Fabio Estevam ff1b15acb4 ASoC: fsl: fsl_ssi: Use '%ld' to print 'long int'
Commit 6873ee464a (ASoC: fsl_ssi: Fix printing return code on clk error) caused
the following build warning:

sound/soc/fsl/fsl_ssi.c: In function 'fsl_ssi_probe':
sound/soc/fsl/fsl_ssi.c:1196:6: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat]

Fix it by using '%ld' to print the 'long int' format.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-07 10:54:28 +00:00
Lars-Peter Clausen 002220a90d ASoC: dpcm: Allow PCMs to omit the set of supported formats
Allow PCMs that do not impose any restrictions on the supported formats to set
the formats field to 0, Instead of assuming that this means that the PCM does
not support any formats (which doesn't make much sense), assume that it supports
all formats. This brings the behavior of DPCM closer to that of non-DPCM.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 17:42:42 +00:00
Lars-Peter Clausen 08ae9b456d ASoC: dpcm: Add helper function for initializing runtime pcm
We have the same code for initializing the runtime pcm on both the playback and
the capture path. Factor this out into a common helper function.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 17:36:48 +00:00
Lars-Peter Clausen 6ed54f08ba ASoC: atmel: 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>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 16:45:24 +00:00
Alexander Shiyan 2b32098f74 ASoC: mc13783: trivial: Cleanup module
This is a trivial cleanup: remove useless variable mc13xxx and
extra spaces. No functional changes.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 15:37:43 +00:00
Alexander Shiyan 295b84237b ASoC: mc13783: Drop fixed ADC & DAC ports usage
There are no users of this driver without pdata, so stop using
constant assignment of ADC and DAC ports.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 15:37:43 +00:00
Alexander Shiyan 0acb26a6c7 ASoC: mc13783: Use core error messages if registration fails
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 15:37:43 +00:00
Alexander Shiyan a5d3f6abbf ASoC: mc13783: Use module_platform_driver_probe()
mc13783-codec is probed only by MC13XXX MFD core driver so
use module_platform_driver_probe().

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 15:37:43 +00:00
Xiubo Li e2a19ac6c5 ASoC: simple-card: Fix the sysclk selection.
For spdif there is no need to do the sysclk setting.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 15:28:50 +00:00