1
0
Fork 0
Commit Graph

87 Commits (7c8e6b9c2811fd37702a9043eabea3545022011e)

Author SHA1 Message Date
Linus Torvalds 14864a52cd sound fixes for 3.14-rc1
The big chunks here are the updates for oxygen driver for Xonar DG
 devices, which were slipped from the previous pull request.  They are
 device-specific and thus not too dangerous.
 
 Other than that, all patches are small bug fixes, mainly for Samsung
 build fixes, a few HD-audio enhancements, and other misc ASoC fixes.
 (And this time ASoC merge is less than Octopus, lucky seven :)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJS69k+AAoJEGwxgFQ9KSmk6pMQAIbo4mBrMzdkt7elEErpdpDj
 4P11/owXL+/gD+fTVXyTubvalXN9MATUWnHbLqi9qTYWx7u/RjnP32PQ0aMSyq1r
 PJq99Or+H+H2ui1dTsgIg2A8pYvbeuzU+Y7UcTusy9IolZNvKTNHVJRL79QQzNrp
 JTX220K4wLAjrl96fOtJ2gpABSej2kLdJ8Tj+YE7eMzySw+nS18nwoca2l3GPcR4
 qAyDQ0owgOWmBBaExSAgC9ck0l6NVSAba9r1ub156Szf0htmv5+pHqv3JJjKVTc/
 NmD/XVZxT7jEucPb6tAvmSfAqQBm97mX3nXVKQd3+QlH3pRI0pifS4ZOgRqJUZr/
 XZnM5lB17kd7XCBqnik+Nk9EmBRgF5ASRatVE+Mg469i9GBzqQOv0NTEsqL+Vhmb
 6tng5hBOV8o3v4/Z3uPVMtTEP+UYj+d8YseleNV5OI7dfjqQPZHWTeCllKl42Rra
 Ui5P1V1i1KD2jgiqbLR4XYmkMbXY31o5I6BvKb1iJ2jVn0igtrFpcD28Z+ufENLk
 /618pjpJH9WswwzYTAB1lijbM2Wuh7KF/UwsA02OyT4glwVYkMjEYQybpeQQ31sA
 vNiOLiy0epAw/8FBvg2nVl8n5EdFCiLlczqFhcabBEvO/RAqg4w9ipUBlR6OMo0+
 JQTwuvLLjyimHkQdUcmO
 =QB98
 -----END PGP SIGNATURE-----

Merge tag 'sound-fix-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "The big chunks here are the updates for oxygen driver for Xonar DG
  devices, which were slipped from the previous pull request.  They are
  device-specific and thus not too dangerous.

  Other than that, all patches are small bug fixes, mainly for Samsung
  build fixes, a few HD-audio enhancements, and other misc ASoC fixes.
  (And this time ASoC merge is less than Octopus, lucky seven :)"

* tag 'sound-fix-3.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (42 commits)
  ALSA: hda/hdmi - allow PIN_OUT to be dynamically enabled
  ALSA: hda - add headset mic detect quirks for another Dell laptop
  ALSA: oxygen: Xonar DG(X): cleanup and minor changes
  ALSA: oxygen: Xonar DG(X): modify high-pass filter control
  ALSA: oxygen: Xonar DG(X): modify input select functions
  ALSA: oxygen: Xonar DG(X): modify capture volume functions
  ALSA: oxygen: Xonar DG(X): use headphone volume control
  ALSA: oxygen: Xonar DG(X): modify playback output select
  ALSA: oxygen: Xonar DG(X): capture from I2S channel 1, not 2
  ALSA: oxygen: Xonar DG(X): move the mixer code into another file
  ALSA: oxygen: modify CS4245 register dumping function
  ALSA: oxygen: modify adjust_dg_dac_routing function
  ALSA: oxygen: Xonar DG(X): modify DAC/ADC parameters function
  ALSA: oxygen: Xonar DG(X): modify initialization functions
  ALSA: oxygen: Xonar DG(X): add new CS4245 SPI functions
  ALSA: oxygen: additional definitions for the Xonar DG/DGX card
  ALSA: oxygen: change description of the xonar_dg.c file
  ALSA: oxygen: export oxygen_update_dac_routing symbol
  ALSA: oxygen: add mute mask for the OXYGEN_PLAY_ROUTING register
  ALSA: oxygen: modify the SPI writing function
  ...
2014-01-31 15:38:09 -08:00
Linus Torvalds ca2a650f3d Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma
Pull slave-dma updates from Vinod Koul:
 - new driver for BCM2835 used in R-pi
 - new driver for MOXA ART
 - dma_get_any_slave_channel API for DT based systems
 - minor fixes and updates spread acrooss driver

[ The fsl-ssi dual fifo mode support addition clashed badly with the
  other changes to fsl-ssi that came in through the sound merge.  I did
  a very rough cut at fixing up the conflict, but Nicolin Chen (author
  of both sides) will need to verify and check things ]

* 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (36 commits)
  dmaengine: mmp_pdma: fix mismerge
  dma: pl08x: Export pl08x_filter_id
  acpi-dma: align documentation with kernel-doc format
  dma: fix vchan_cookie_complete() debug print
  DMA: dmatest: extend the "device" module parameter to 32 characters
  drivers/dma: fix error return code
  dma: omap: Set debug level to debugging messages
  dmaengine: fix kernel-doc style typos for few comments
  dma: tegra: add support for Tegra148/124
  dma: dw: use %pad instead of casting dma_addr_t
  dma: dw: join split up messages
  dma: dw: fix style of multiline comment
  dmaengine: k3dma: fix sparse warnings
  dma: pl330: Use dma_get_slave_channel() in the of xlate callback
  dma: pl330: Differentiate between submitted and issued descriptors
  dmaengine: sirf: Add device_slave_caps interface
  DMA: Freescale: change BWC from 256 bytes to 1024 bytes
  dmaengine: Add MOXA ART DMA engine driver
  dmaengine: Add DMA_PRIVATE to BCM2835 driver
  dma: imx-sdma: Assign a default script number for ROM firmware cases
  ...
2014-01-29 20:27:23 -08:00
Fabio Estevam efe2ab9b02 ASoC: fsl_ssi: Do not print 'baud clock' error message all the time
Currently everytime we get the following message on boot:

fsl-ssi-dai 202c000.ssi: could not get baud clock: -2

This is not really useful information to get on every boot, so make it a debug
message instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-21 18:48:35 +00:00
Fabio Estevam ae1f8ce192 ASoC: fsl_ssi: We do support master mode now
Since commit aafa85e71a (ASoC: fsl_ssi: Add DAI master mode support for SSI on
i.MX series) master mode is supported, so update the comments and code to
reflect that.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-21 18:48:00 +00:00
Mark Brown 701caa51a2 Merge remote-tracking branches 'asoc/topic/adsp', 'asoc/topic/atmel', 'asoc/topic/bcm2835', 'asoc/topic/docs', 'asoc/topic/fsl', 'asoc/topic/generic', 'asoc/topic/kirkwood', 'asoc/topic/mc13783', 'asoc/topic/mxs', 'asoc/topic/nuc900', 'asoc/topic/sai', 'asoc/topic/sh', 'asoc/topic/ssm2602', 'asoc/topic/tlv320aic3x', 'asoc/topic/twl4030', 'asoc/topic/ux500', 'asoc/topic/width' and 'asoc/topic/x86' into for-tiwai 2014-01-16 12:44:01 +00:00
Mark Brown 2f43a23ab9 Merge remote-tracking branch 'asoc/topic/pcm' into for-tiwai 2014-01-16 12:42:57 +00:00
Lars-Peter Clausen 24710c9796 ASoC: fsl: Don't mix SNDRV_PCM_RATE_CONTINUOUS with specific rates
SNDRV_PCM_RATE_CONTINUOUS means that all rates (possibly limited to a certain
interval) are supported. There is no need to manually set other rate bits.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-14 20:42:26 +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
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
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
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
Alexander Shiyan 6873ee464a ASoC: fsl_ssi: Fix printing return code on clk error
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-06 13:19:56 +00:00
Nicolin Chen aafa85e71a ASoC: fsl_ssi: Add DAI master mode support for SSI on i.MX series
This patch adds three main functions for DAI master mode: set_dai_fmt(),
set_dai_sysclk() and set_dai_tdm_slot(), and one essential baud clock
accordingly. After appending this patch, the fsl_ssi driver on i.MX series
has the ability to derive LRCLK and BCLK from baud clock source so as to
support some audio Codecs which can only be used in slave mode.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-19 15:03:52 +00:00
Nicolin Chen 0da9e55e71 ASoC: fsl_ssi: Add dual fifo mode support
By enabling dual fifo mode, it would allow SSI enter a better performance
to transimit/receive data without occasional hardware underrun/overrun.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Acked-by: Timur Tabi <timur@tabi.org>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2013-12-16 09:18:48 +05:30
Nicolin Chen 07a9483aac ASoC: fsl_ssi: Implement symmetric_channels and symmetric_samplebits
Since we introduced symmetric_channels and symmetric_samplebits, we implement
these two features to fsl_ssi so as to drop some no-more-needed code and make
the driver neat and clean.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-03 14:58:17 +00:00
Nicolin Chen 2924a99810 ASoC: fsl_ssi: Add monaural audio support for non-ac97 interface
The normal mode of SSI allows it to send/receive data to/from the first
slot of each period. So we can use this normal mode to trick I2S signal
by puting/getting data to/from the first slot only (the left channel)
so as to support monaural audio playback and recording.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-02 17:37:07 +00:00
Lars-Peter Clausen 7e6d18ac7e ASoC: fsl: Use devm_snd_dmaengine_pcm_register()
Makes the code shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-02 11:48:54 +00:00
Markus Pargmann d8764646e1 ASoC: fsl-ssi: Move ac97 specific setup to seperate function
This is a pure cleanup patch to increase code readability.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-24 13:39:34 +00:00
Chen Gang d60336e2f1 ASoC: fsl_ssi: let check zero instead of check NO_IRQ
NO_IRQ may be defined as '(unsigned int) -1' in some architectures
(arm, sh ...), and either may not be defined in some architectures
which can enable SND_SOC_FSL_SSI (e.g. allmodconfig for arc).

When irq_of_parse_and_map() fails, it will always return 0, so need
check zero instead of NO_IRQ, or will cause compiling issue or run
time bug in some architectures.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 11:28:52 +01:00
Fabio Estevam 64d2307c3b ASoC: fsl: fsl_ssi: Fix simultaneous capture and playback
When doing simultaneous capture and playback on a mx6 board we get the following
error:

$ arecord -f cd  | aplay -f cd
imx-sgtl5000 sound.13: set sample size in capture stream first
fsl-ssi-dai 2028000.ssi: ASoC: can't open interface 2028000.ssi: -11
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_
open) unable to open slave
aplay: main:660: audio open error: Device or resource busy
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

The 'arecord -f cd  | aplay -f cd' always trigger cause the
'if (!first_runtime->sample_bits)' block to be true which returns an error.

Adjust the logic inside fsl_ssi_startup(), so that we do not always hit the
error when playing  'arecord | aplay' line for the first time.

Reported-by: Chris Clepper <cgclepper@gmail.com>
Suggested-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-24 11:00:13 +01:00
Sachin Kamat feb8f11476 ASoC: fsl_ssi: Remove redundant dev_set_drvdata
Driver core sets the driver data to NULL on detach.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 13:35:53 +01:00
Sachin Kamat a851a2bb2d ASoC: fsl_ssi: Staticize local symbols
Local symbols used only in this file are made static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 00:39:00 +01:00
Fabio Estevam f61df38428 ASoC: fsl_ssi: Remove unnecessary dev_set_drvdata()
Driver core clears the driver data to NULL after device_release or on probe
failure, so just remove it from here.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-26 20:41:59 +01:00
Michael Grzeschik f037708654 ASoC: fsl: disable ssi irq for imx
We have to disable the ssi irq, as it is not safe for all platforms to
write back into the status register. It also runs into non-linefetch
aborts.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22 11:11:20 +01:00
Michael Grzeschik 9b443e3d89 ASoC: fsl-ssi: imx-pcm-fiq bugfix
imx-pcm-fiq is checking for TE RE bits, so enable them only if
necessary.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22 11:10:25 +01:00
Steffen Trumtrar f8fdf5375e ASoC: fsl-ssi: add SSIEN errata work around
The chip errata for the i.MX35, Rev.2 has the following errata:

ENGcm06222: SSI:Transmission does not take place in bit length early frame sync
	    configuration

The workaround states, that TX_EN and SSI_EN bits should be set in the same
register write. As the next errata in the document (ENGcm06532) says to always
write RX_EN and TX_EN in the same register write in network mode.

Therefore include the whole write to
	CCSR_SSI_SCR_TE and CCSR_SSI_SCR_RE
into the write to
	CCSR_SSI_SCR_SSIEN

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22 11:09:52 +01:00
Markus Pargmann cd7f0295aa ASoC: fsl-ssi: ac97-slave support
This patch adds ac97-slave support.

For ac97, the registers have to be setup earlier than for other ssi
modes because there is some communication with the external device
before streaming. So this patch introduces a fsl_ssi_setup function to
setup the registers for different ssi operation modes seperately.

This patch was tested with imx27-pca100.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22 11:09:10 +01:00
Fabio Estevam 0783e64898 ASoC: fsl: fsl_ssi: Fix the order of resources removal
In fsl_ssi_remove() we need to remove the resources in the opposite order that
they were acquired in probe.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-20 11:47:04 +01:00
Markus Pargmann 3a5e517bb2 ASoC: fsl-ssi: Use generic DMA bindings if possible
There may be some platforms using fsl-ssi that do not have a DMA driver
with generic DMA bindings. So this patch adds support for the generic
DMA bindings, while still accepting the old "fsl,dma-events" property if
"dmas" is not found.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-06 17:59:29 +01:00
Markus Pargmann de623ece5b ASoC: fsl-ssi: Add support for imx-pcm-fiq
Add support for non-dma pcm for imx platforms with imx-pcm-fiq support.
Instead of imx-pcm-audio, in this case imx-pcm-fiq-audio device is added
and the SIER flags are set differently.

We need imx-pcm-fiq for some boards that use an incompatible codec.
imx-pcm-fiq handles those codecs differently and allows to operate with
them. DMA is not possible because some data sent by the codecs, e.g.
wm9712, is not in the datastream. Also some data is mixed up in the
fifos, so that we need to sort them out manually.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-06 17:57:24 +01:00
Nicolin Chen 32bd8cd257 ASoC: fsl: Set sdma peripheral type directly
Let CPU DAI drivers set SDMA periperal type directly to support more
dma types(SPDIF, ESAI) other than only two for SSI.
This will easily allow some non-SSI drivers to use the imx-pcm-dma
as well.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-25 20:11:27 +01:00
Fabio Estevam f3142807fd ASoC: fsl: fsl_ssi: Add MODULE_ALIAS
Add MODULE_ALIAS, so that auto module loading can work.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Timur Tavi <timur@tabi.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-22 00:54:46 +01:00
Mark Brown 0a9eaa39db ASoC: fsl_ssi: Provide register I/O functions by default
Use the ARM version by default as that's the more generally portable
one, it doesn't matter if they work well on random platforms when the
goal is only build coverage.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Timur Tabi <timur@tabi.org>
2013-07-19 13:05:06 +01:00
Fabio Estevam ede32d3a23 ASoC: fsl: fsl_ssi: Check the return value from clk_prepare_enable()
clk_prepare_enable() may fail, so let's check its return value and propagate it
in the case of error.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-17 11:03:54 +01:00
Fabio Estevam b0a4747a5d ASoC: fsl: fsl_ssi: Use devm_ functions
Using devm_ functions can make the code cleaner and smaller.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-17 11:03:54 +01:00
Nicolin Chen b2c119b0bb ASoC: fsl: Disable SSI in trigger() if RE/TE are both cleared
The code enabled SSIEN when triggered by SNDRV_PCM_TRIGGER_START,
so move the disable code to SNDRV_PCM_TRIGGER_STOP for symmetric.

This also allows us to use the SSI driver more flexible so that
it can support some use cases like "aplay S16_LE.wav S24_LE.wav"
which would call the driver in sequence like:
 startup()->hw_params(S16_LE)->trigger(START)->tirgger(STOP)->
 hw_params(S24_LE)->trigger(START)->tirgger(STOP)->shutdown()

If we disable SSIEN in shutdown(), the second hw_params() would
bypass the sample bits setting while using symmetric_rate.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-15 11:10:37 +01:00
Shawn Guo bd41bc9696 ASoC: fsl: remove use of imx-pcm-audio from fsl_ssi
Rather than instantiating imx-pcm-audio to call imx_pcm_dma_init(),
fsl_ssi can just directly call it to save the use of imx-pcm-audio.
With this change, fsl_ssi becomes not only a cpu DAI but also a platform
device, so updates platform device setup in imx-sgtl5000 accordingly.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15 09:27:26 +04:00
Takashi Iwai 8dd2b66d1a ASoC: More updates for v3.10
The main additional change here is Lars-Peter's DMA work plus the
 platform conversions which have been tested - getting this in mainline
 will make life easier for development after the merge window.  These
 factor a large chunk of code out of the drivers for the platforms using
 dmaengine, greatly simplifying development.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRb/60AAoJELSic+t+oim9vL8P+wfaXRBGDtxhzMnTCf/cR2sc
 vlRnmSjA4s14vCoPffQJI0zaGLwDT5FnQtg6DAkP/8vXRoUz4Hgb0UwwDPiQNGED
 6Wmqm7mU+XGWgo4bPBA1e3Bt/9phVVO62rNPMNEnNqcp/Fa3RrdFAfxy4EUz9sKa
 lX4KJETCbIvLpOJmgq3H/WGtgYEnULHSCCNUQQ+fEY/VRQLsMtY5+tnZIJilMez0
 Ff6B084kE5oQpMsxdf89q8O5Uqc8lB0Xleluh0yQ1YZK3lxELMgr1Z7BkitysaJh
 uid+Ze8Vj2n5duI87OZcHN1Z2SibgTzqUwsd6YGCUKK3D3KVcSYgaYNn3zY09KNG
 tYlckAOJgVXqe1jedsfyuKTraz2JBY+jWYcIf8cRbwxxZpItG4Oj3idIBAKw+FrE
 /0DGqW7U9wXKx8pg7BH3dE6J6WVZ5uryaQX9d+nC8CGGjpcCla5L5jl/8stgGniW
 StTk4ETB6PP6iApv11p/7CXaTqXi+9UHmlcHFo11oQKiJFx4kG21DKQCXS0ycocM
 j0/gRGesWrVawYwJ86dhciUJjWlTHwproE/75i1JsTd3eRX6ybjBeNTTAI2ll/BJ
 BFDTS7tbX7GVcNbwXCvxW6pKOPpqV9jh0yMgpaB4jtkXOTKV/Z73ThPEql5w27c5
 OTBtONmiYeBcZGvgKQ3r
 =MXrq
 -----END PGP SIGNATURE-----

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

ASoC: More updates for v3.10

The main additional change here is Lars-Peter's DMA work plus the
platform conversions which have been tested - getting this in mainline
will make life easier for development after the merge window.  These
factor a large chunk of code out of the drivers for the platforms using
dmaengine, greatly simplifying development.
2013-04-18 16:24:31 +02:00
Lars-Peter Clausen fc8ba7f94d ASoC: imx: Setup dma data in DAI probe
This allows us to access the DAI DMA data when we create the PCM. We'll use
this when converting imx to generic DMA engine PCM driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-17 14:26:27 +01:00
Mark Brown 38e8c895d3 Merge remote-tracking branch 'asoc/topic/dma' into asoc-next 2013-04-12 13:57:04 +01:00
Lars-Peter Clausen a8909c9bc5 ASoC: fsl: Use common DAI DMA data struct
Use the common DAI DMA data struct for fsl/imx, this allows us to use the common
helper function to configure the DMA slave config based on the DAI DMA data.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-05 11:25:47 +01:00
Kuninori Morimoto 3580aa10fb ASoC: switch over to use snd_soc_register_component() on fsl ssi
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26 21:55:26 +00:00