Commit Graph

1356 Commits

Author SHA1 Message Date
Mark Brown ac6d7c48e3 Merge remote-tracking branch 'asoc/topic/compress' into asoc-next 2014-01-20 11:50:41 +00:00
Liam Girdwood 2a99ef0fdb ASoC: compress: Add suport for DPCM into compressed audio
Currently compressed audio streams are statically routed from the /dev
to the DAI link. Some DSPs can route compressed data to multiple BE DAIs
like they do for PCM data.

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

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

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-17 17:56:21 +00:00
Mark Brown 2f43a23ab9 Merge remote-tracking branch 'asoc/topic/pcm' into for-tiwai 2014-01-16 12:42:57 +00:00
Mark Brown 99896f714a Merge remote-tracking branch 'asoc/topic/dapm' into for-tiwai 2014-01-16 12:42:53 +00:00
Lars-Peter Clausen e3a9269f87 ALSA: Add helper function for intersecting two rate masks
A bit of special care is necessary when creating the intersection of two rate
masks. This comes from the special meaning of the SNDRV_PCM_RATE_CONTINUOUS and
SNDRV_PCM_RATE_KNOT bits, which needs special handling when intersecting two
rate masks. SNDRV_PCM_RATE_CONTINUOUS means the hardware supports all rates in a
specific interval. SNDRV_PCM_RATE_KNOT means the hardware supports a set of
discrete rates specified by a list constraint. For all other cases the supported
rates are specified directly in the rate mask.

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

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

Linux 3.13-rc3
2014-01-14 20:41:53 +00:00
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
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
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
Takashi Iwai 0822069f3f ASoC: Updates for v3.14
Not a lot going on framework wise, partly due to Christmas at least in
 the case of the work I've been doing, but there's been quite a lot of
 cleanup activity going on and the usual trickle of new drivers:
 
  - Update to the generic DMA code to support deferred probe and managed
    resources.
  - New drivers for BCM2835 (used in Raspberry Pi), Tegra with MAX98090
    and Analog Devices AXI I2S and S/PDIF controller IPs.
  - Device tree support for the simple card, max98090 and cs42l52.
  - Conversion of the Samsung drivers to native dmaengine, making them
    multiplatform compatible and hopefully helping keep them more modern
    and up to date.
  - More regmap conversions, including a very welcome one for twl6040
    from Peter Ujfalusi.
  - A big overhaul of the DaVinci drivers also from Peter Ujfalusi.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJSxaXVAAoJELSic+t+oim9q3IP/jc8A8dHx75Jur5oMfDREmlp
 wSkqDF4Euc7JbWCGcxQnLlSCo7Z+SQX88S8QJfU2UqYxngwESvgf4VafXN/Kt64x
 Y4bO8UPslGvmErck8ZQENn6rD5HyHyqGyZA2E1e5OcQjwvcYv9IO+q7gTJskq/Io
 ouQ6SLeX7eSekRHYtPYg0vzwoLAsJH2Kjn+wpUq0iDfq2/MF1BzNWGAPZJEY1EXw
 pBHYnRNqDuNPUG6LCvrkRcMF8Z+dA/EA0jI/3CwWirXEs9meCE9cH7d1WJJ1wrFy
 wsns/8wghZYozO0d2m1KpRp+8NwoKKTaApJh/B+wssKFVrdvRpvUli8bq4lg3EIf
 oQIqUTxvH1XSWYYP+cj46bQeEiY6Msf1XdhSYOP/TX7XM0xYjBwfKUez6XgllD1r
 SZBe4uS82zB35lf7PyC9c854zokblNna+czDI82LtC0jI9mMZ2Q1bjkcOTH+Yk9n
 WD6K8W+N2x0oD0yWVo8vZ0VSRg0HE+j+ZIZPFBxmK4fllZIESjJ9HjVUYbIoi6hm
 y/860xUZBLSc82MqU6zZqQPXxWuH0g52gb3oo/ue6h4r13JyEwK4TlhJYCHv8mWo
 tqheM+SqOapi1Yd92GoAseZaP1ulpz8uEMossrOksPiQO+oM4C9OxIdujCwor2/p
 x8eyf47w7tAogy9caBXk
 =jhuo
 -----END PGP SIGNATURE-----

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

ASoC: Updates  for v3.14

Not a lot going on framework wise, partly due to Christmas at least in
the case of the work I've been doing, but there's been quite a lot of
cleanup activity going on and the usual trickle of new drivers:

 - Update to the generic DMA code to support deferred probe and managed
   resources.
 - New drivers for BCM2835 (used in Raspberry Pi), Tegra with MAX98090
   and Analog Devices AXI I2S and S/PDIF controller IPs.
 - Device tree support for the simple card, max98090 and cs42l52.
 - Conversion of the Samsung drivers to native dmaengine, making them
   multiplatform compatible and hopefully helping keep them more modern
   and up to date.
 - More regmap conversions, including a very welcome one for twl6040
   from Peter Ujfalusi.
 - A big overhaul of the DaVinci drivers also from Peter Ujfalusi.
2014-01-05 11:19:46 +01:00
Mark Brown 2cde51fbd0 Merge remote-tracking branches 'asoc/topic/ad1836', 'asoc/topic/ad193x', 'asoc/topic/adav80x', 'asoc/topic/adsp', 'asoc/topic/ak4641', 'asoc/topic/ak4642', 'asoc/topic/arizona', 'asoc/topic/atmel', 'asoc/topic/au1x', 'asoc/topic/axi', 'asoc/topic/bcm2835', 'asoc/topic/blackfin', 'asoc/topic/cs4271', 'asoc/topic/cs42l52', 'asoc/topic/da7210', 'asoc/topic/davinci', 'asoc/topic/ep93xx', 'asoc/topic/fsl', 'asoc/topic/fsl-mxs', 'asoc/topic/generic', 'asoc/topic/hdmi', 'asoc/topic/jack', 'asoc/topic/jz4740', 'asoc/topic/max98090', 'asoc/topic/mxs', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/rcar', 'asoc/topic/s6000', 'asoc/topic/sai', 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/spear', 'asoc/topic/ssm2518', 'asoc/topic/ssm2602', 'asoc/topic/tegra', 'asoc/topic/tlv320aic3x', 'asoc/topic/twl6040', 'asoc/topic/txx9', 'asoc/topic/uda1380', 'asoc/topic/width', 'asoc/topic/wm8510', 'asoc/topic/wm8523', 'asoc/topic/wm8580', 'asoc/topic/wm8711', 'asoc/topic/wm8728', 'asoc/topic/wm8731', 'asoc/topic/wm8741', 'asoc/topic/wm8750', 'asoc/topic/wm8753', 'asoc/topic/wm8776', 'asoc/topic/wm8804', 'asoc/topic/wm8900', 'asoc/topic/wm8901', 'asoc/topic/wm8940', 'asoc/topic/wm8962', 'asoc/topic/wm8974', 'asoc/topic/wm8985', 'asoc/topic/wm8988', 'asoc/topic/wm8990', 'asoc/topic/wm8991', 'asoc/topic/wm8994', 'asoc/topic/wm8995', 'asoc/topic/wm9081' and 'asoc/topic/x86' into asoc-next 2014-01-02 13:01:55 +00:00
Mark Brown 75aac82060 Merge remote-tracking branch 'asoc/topic/dma' into asoc-next 2014-01-02 13:01:52 +00:00
Mark Brown 729b47a007 Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2014-01-02 13:01:50 +00:00
Kuninori Morimoto ef74940043 ASoC: rsnd: add SRC (Sampling Rate Converter) support
This patch adds SRC support to Renesas sound driver.
SRC converts sampling rate between codec <-> cpu.
It needs special codec chip,
or very simple DA/AD converter to use it.
This patch was tested via ak4554 codec,
and supports Gen1 only at this point.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-31 13:35:31 +00:00
Mark Brown 8c5178fca4 ALSA: Add params_width() helpers
Add helpers for obtaining the width of a format directly from params
since this is expected to become a common operation in ASoC.

Signed-off-by: Mark Brown <broonie@linaro.org>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
2013-12-30 12:19:26 +00:00
Stephen Warren e1771bcf99 ASoC: SPEAr: remove custom DMA alloc compat function
spear_pcm_request_chan() is almost identical to
dmaengine_pcm_compat_request_channel(), with the exception that the
latter:

a) Assumes that the DAI DMA data is a struct snd_dmaengine_dai_dma_data
   pointer rather than some custom type.

b) dma_data->filter_data rather than dma_data should be passed to
   snd_dmaengine_pcm_request_channel() as the filter data.

Make minor changes to the SPEAr DAI drivers so that those two conditions
are met. This allows removal of the custom .compat_request_channel().

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-18 18:55:06 +00:00
Takashi Iwai d09476018b Merge branch 'for-linus' into for-next 2013-12-16 15:53:52 +01:00
Stefano Panella 932e9dec38 ALSA: memalloc.h - fix wrong truncation of dma_addr_t
When running a 32bit kernel the hda_intel driver is still reporting
a 64bit dma_mask if the HW supports it.

From sound/pci/hda/hda_intel.c:

        /* allow 64bit DMA address if supported by H/W */
        if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64)))
                pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(64));
        else {
                pci_set_dma_mask(pci, DMA_BIT_MASK(32));
                pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32));
        }

which means when there is a call to dma_alloc_coherent from
snd_malloc_dev_pages a machine address bigger than 32bit can be returned.
This can be true in particular if running  the 32bit kernel as a pv dom0
under the Xen Hypervisor or PAE on bare metal.

The problem is that when calling setup_bdle to program the BLE the
dma_addr_t returned from the dma_alloc_coherent is wrongly truncated
from snd_sgbuf_get_addr if running a 32bit kernel:

static inline dma_addr_t snd_sgbuf_get_addr(struct snd_dma_buffer *dmab,
                                           size_t offset)
{
        struct snd_sg_buf *sgbuf = dmab->private_data;
        dma_addr_t addr = sgbuf->table[offset >> PAGE_SHIFT].addr;
        addr &= PAGE_MASK;
        return addr + offset % PAGE_SIZE;
}

where PAGE_MASK in a 32bit kernel is zeroing the upper 32bit af addr.

Without this patch the HW will fetch the 32bit truncated address,
which is not the one obtained from dma_alloc_coherent and will result
to a non working audio but can corrupt host memory at a random location.

The current patch apply to v3.13-rc3-74-g6c843f5

Signed-off-by: Stefano Panella <stefano.panella@citrix.com>
Reviewed-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-10 15:30:46 +01:00
Stephen Warren 194c7dea00 ASoC: dmaengine: add custom DMA config to snd_dmaengine_pcm_config
Add fields to struct snd_dmaengine_pcm_config to allow custom:

- DMA channel names.

  This is useful when the default "tx" and "rx" channel names don't
  apply, for example if a HW module supports multiple channels, each
  having different DMA channel names. This is the case with the FIFOs
  in Tegra's AHUB. This new facility can replace
  SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME.

- DMA device

  This allows requesting DMA channels for a device other than the device
  which is registering the "PCM" driver. This is quite unusual, but is
  currently useful on Tegra. In much HW, and in Tegra20, each DAI HW
  module contains its own FIFOs which DMA writes to. However, in Tegra30,
  the DMA FIFOs were split out AHUB HW module, which then routes the data
  through a cross-bar, and into the DAI HW modules. However, the current
  ASoC driver structure does not expose this detail, and acts as if the
  FIFOs are still part of the DAI HW modules. Consequently, the "PCM"
  driver is registered with the DAI HW module, yet the DMA channels must
  be looked up in the AHUB HW module's device tree node. This new config
  field allows that to happen. Eventually, the Tegra drivers will be
  reworked to fully expose the AHUB, and this config field can be
  removed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-09 18:45:01 +00:00
Takashi Iwai ed326363d7 ALSA: hda - Split verb definitions into sound/hda_verbs.h
Since there are more HD-audio compatible codecs, move the definitions
of HD-audio verbs into common header location, include/sound, so that
it can be included cleanly from other drivers than HD-audio driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-09 17:31:40 +01:00
Mark Brown e73462f573 Merge remote-tracking branch 'asoc/topic/symmetry' into asoc-fsl 2013-12-03 14:58:07 +00:00
Lars-Peter Clausen 21585ee848 ASoC: Add resource managed snd_dmaengine_pcm_register()
For many drivers using the generic dmaengine PCM driver one of the few (or the
only) things left to do in the drivers remove function is to unregister the PCM
device. This patch adds a resource managed version of snd_dmaengine_pcm_register()
which makes it possible to simplify the remove function as well as the error
path in the probe function for those drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-28 13:35:36 +00:00
Brian Austin 44b2ed5403 ASoC: cs42l52: Make MICA/B mixer dependent on mic config
MICA/B Single-Ended input selection depends on mica/b config so lets
make the mixer controls for them only show for selected mic's

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-28 10:20:51 +00:00
Brian Austin a3d36bc2ab ASoC: cs42l52: Reorganize MICA/B Config and Select
This patch reworks the MICA an MICB config for single-ended or
differential and the selection of which MIC for the single config

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-28 10:20:51 +00:00
Takashi Iwai 8778ac6be2 ASoC: Fix build without CONFIG_GPIOLIB
snd_soc_jack_gpio stuff is currently enabled for CONFIG_GPIOLIB
explicitly with ifdef, and this causes build errors on some drivers
such as:
  sound/soc/omap/rx51.c:220:33: error: array type has incomplete element type

Remove ifdef and provide dummy functions for CONFIG_GPIOLIB=n case
instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-25 17:12:15 +00:00
Stephen Warren faf6615bf0 ASoC: dapm: Use SND_SOC_DAPM_INIT_REG_VAL in SND_SOC_DAPM_MUX
SND_SOC_DAPM_MUX() doesn't currently initialize the .mask field. This
results in the mux never affecting HW, since no bits are ever set or
cleared. Fix SND_SOC_DAPM_MUX() to use SND_SOC_DAPM_INIT_REG_VAL() to
set up the reg, shift, on_val, and off_val fields like almost all other
SND_SOC_xxx() macros. It looks like this was a "typo" in the fixed
commit linked below.

This makes the speakers on the Toshiba AC100 (PAZ00) laptop work again.

Fixes: de9ba98b6d ("ASoC: dapm: Make widget power register settings more flexible")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: <stable@vger.kernel.org> # v3.12+
2013-11-24 13:55:41 +00:00
Nicolin Chen 3635bf09a8 ASoC: soc-pcm: add symmetry for channels and sample bits
Some SoCs can only work in mono or stereo mode at one time. So if
we let them capture a mono stream while playing a stereo stream,
there might be a problem occur to one of these two streams: double
paced or slowed down.

In soc-pcm.c, we have soc_pcm_apply_symmetry() to apply the rate
symmetry. But we don't have one for channels.

Likewise, we can treat symmetric_rate as a solution for those SoCs
or CODECs which can not handle asymmetrical LRCLK. But it's also
impossible for them to handle asymmetrical BCLK. And accodring to
BCLK = LRCLK * channel number * slot size(fixed or sample bits),
sample bits might also be a problem if they are not using a fixed
slot size.

Thus, this patch applys symmetry for channels and sample bits.

Meanwhile, there might be a race between two substreams if starting
simultaneously. Previously, we only added warning to compalin but
still using conservative way to let it carry on. However, this patch
rejects the second stream with any unmatched parameter to make sure
the first existing stream won't be broken.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-24 13:32:50 +00:00
Kuninori Morimoto 324752632a ASoC: rcar: rename GEN2_SRU to GEN2_SCU
Gen2 has SCU. SRU is for Gen1

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-20 09:44:05 +00:00
Vinod Koul f44f2a5417 ALSA: compress: fix drain calls blocking other compress functions (v6)
The drain and drain_notify callback were blocked by low level driver
until the draining was complete. Due to this being invoked with big
fat mutex held, others ops like reading timestamp, calling pause, drop
were blocked.

So to fix this we add a new snd_compr_drain_notify() API. This would
be required to be invoked by low level driver when drain or partial
drain has been completed by the DSP. Thus we make the drain and
partial_drain callback as non blocking and driver returns immediately
after notifying DSP.  The waiting is done while releasing the lock so
that other ops can go ahead.

[ The commit 917f4b5cba was wrongly applied from the preliminary
  patch.  This commit corrects to the final version.
  Sorry for inconvenience!  -- tiwai ]

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
CC: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-07 10:12:27 +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 05e48b5064 Merge remote-tracking branch 'asoc/topic/cs42l52' into asoc-next 2013-11-03 22:04:16 -08:00
Takashi Iwai e12483e0f3 ALSA: ak4114: Fix wrong register array size
The size of the register cache array is actually 6 instead of 7,
as it caches up to AK4114_REG_INT1_MASK.  This resulted in unexpected
access out of array range, although most of them aren't so serious
(just reading one more byte on the stack at snd_ak4114_create()).

Also, the check of cache size was wrongly done by checking with
sizeof() instead of ARRAY_SIZE().  Fixed this together.

(And yes, hardcoded numbers are bad, but I keep the coding style as is
 for making it clear what this patch actually does.)

Spotted by coverity among several CIDs, e.g. 711621.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 16:42:36 +01:00
Brian Austin 6dd1775792 ASoC: cs42l52: Add platform data for reset gpio
This patch adds platform data support for a reset GPIO.
Also uses reset_gpio to toggle reset of the CODEC

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 16:37:58 +01:00
Takashi Iwai 6913a9dbf1 ASoC: Updates for v3.13
- Further work on the dmaengine helpers, including support for
    configuring the parameters for DMA by reading the capabilities of the
    DMA controller which removes some guesswork and magic numbers fromm
    drivers.
  - A refresh of the documentation.
  - Conversions of many drivers to direct regmap API usage in order to
    allow the ASoC level register I/O code to be removed, this will
    hopefully be completed by v3.14.
  - Support for using async register I/O in DAPM, reducing the time taken
    to implement power transitions on systems that support it.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJSajLdAAoJELSic+t+oim9MVEQAJ3t7df5K9R/OynjhKiEFxpP
 cBWo306CegZ5oO17UqG+SReJkOWgUI8zIUkNC818suTjtgyhv4WUBx1QgXG8akO5
 arHZEQGyReLxgWbnO5ScP7BJt5ZYldfQWN+NPnNlzwvVA8R4xChvAwuHL+kUSSYW
 DrOb0ag/Gtn2jQo3o9GbZb5c3UhZqoMg/pQSoVtnvG/O8N/xR0yoeXGsdJv1su6g
 OKhCJTRWU8v3FONatR2wWXnSrCBOeJ2Ec7YUJil1FQQdENYZfV3AOsFHxmqsyG2O
 Xj2P7CioY0JY7dtFcKjrXgsnjvgZmVdVsdegTJPWS9RjunjyupvSyhMhZYkoA60j
 V7RxyIbHAx7hILQqCYYhlOczYHom4MSwAGGt7y7T3oKt0432RvIjE2fP7sTGaqD8
 wzuVYuVl4km03xX9g9abF6xjyDE6e+4wun+d8kSvOosvd/nF47gkXUXEvPZh0Ley
 013e5fHNDaNF4uaSVXE169JyVxVnHP6nXJDRWZakXsryGXGUpn0quIzobf6fb6XE
 fY5Q3QoyP5rHdSMIvGN5Gi76KsHF5CWILWqcWLEVPLnaf9gJmrp3IypmF1c8i7VE
 CrcTim5mhNePEX56skRaHhpYHmsxYApSAzxNAA/t3cJ2rtwb87jMM4jOcjHi/war
 emSVe5lXkcwv/lU/Pa0N
 =rVsK
 -----END PGP SIGNATURE-----

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

ASoC: Updates for v3.13

 - Further work on the dmaengine helpers, including support for
   configuring the parameters for DMA by reading the capabilities of the
   DMA controller which removes some guesswork and magic numbers fromm
   drivers.
 - A refresh of the documentation.
 - Conversions of many drivers to direct regmap API usage in order to
   allow the ASoC level register I/O code to be removed, this will
   hopefully be completed by v3.14.
 - Support for using async register I/O in DAPM, reducing the time taken
   to implement power transitions on systems that support it.
2013-10-25 11:43:47 +02:00
Vinod Koul 917f4b5cba ALSA: compress: fix drain calls blocking other compress functions
The drain and drain_notify callback were blocked by low level driver untill the
draining was complete. Due to this being invoked with big fat mutex held, others
ops like reading timestamp, calling pause, drop were blocked.

So to fix this we add a new snd_compr_drain_notify() API. This would be required
to be invoked by low level driver when drain or partial drain has been completed
by the DSP. Thus we make the drain and partial_drain callback as non blocking
and driver returns immediately after notifying DSP.
The waiting is done while relasing the lock so that other ops can go ahead.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
CC: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-24 14:50:37 +02:00
Takashi Iwai a5606f8561 ALSA: Add ifdef CONFIG_GENERIC_ALLOCATOR for SNDRV_DMA_TYPE_IRAM code
It turned out that we can't use gen_pool_*() functions on archs
without CONFIG_GENERIC_ALLOCATOR (resulting in missing symbols), since
linux/genalloc.h doesn't provide dummy functions for all.  We'd be
able to fix linux/genalloc.h size, but I take an easier path for
now...

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-24 14:36:40 +02:00
Mark Brown 5b2ad46d6e Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next 2013-10-24 11:24:11 +01:00
Mark Brown 10abe843d5 Merge remote-tracking branch 'asoc/topic/mxs' into asoc-next 2013-10-24 11:24:09 +01:00
Mark Brown 70e0db2f74 Merge remote-tracking branch 'asoc/topic/dma' into asoc-next 2013-10-24 11:24:05 +01:00
Mark Brown 48ce3ec16a Merge remote-tracking branch 'asoc/topic/devm' into asoc-next 2013-10-24 11:24:04 +01:00
Mark Brown 0705690110 Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next 2013-10-24 11:24:03 +01:00
Mark Brown 85eb5dce82 Merge remote-tracking branch 'asoc/topic/cs42l73' into asoc-next 2013-10-24 11:24:03 +01:00
Mark Brown d6ee232c7f Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2013-10-24 11:24:02 +01:00
Mark Brown 6180561670 Merge remote-tracking branch 'asoc/topic/component' into asoc-next 2013-10-24 11:24:01 +01:00
Mark Brown d1c59c8712 Merge remote-tracking branch 'asoc/topic/bclk' into asoc-next 2013-10-24 11:24:01 +01:00
Mark Brown ea73b7ddf1 ASoC: dmaengine: Support custom channel names
Some devices have more than just simple TX and RX DMA channels, for example
modern Samsung I2S IPs support a secondary transmit DMA stream which is
mixed into the primary stream during playback. Allow such devices to
specify the names of the channels to be requested in their dma_data.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-10-24 09:52:14 +01:00
Nicolin Chen 055032142c ALSA: Add SoC on-chip internal ram support for DMA buffer allocation
Now it's quite common that an SoC contains its on-chip internal RAM.
By using this RAM space for DMA buffer during audio playback/record,
we can shutdown the voltage for external RAM to save power.

So add new DEV type with iram malloc()/free() and accordingly modify
current default mmap() for the iram circumstance.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-24 09:20:47 +02:00
Kuninori Morimoto cdcfcac968 ASoC: rcar: add rsnd_scu_hpbif_is_enable()
Current SSI needs RSND_SSI_DEPENDENT flag to
decide dependent/independent mode.
And SCU needs RSND_SCU_USE_HPBIF flag
to decide HPBIF is enable/disable.
But these 2 means same things.

This patch adds new rsnd_scu_hpbif_is_enable()
function, and merges above methods.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-20 17:28:37 +01:00