Commit graph

492 commits

Author SHA1 Message Date
Russell King - ARM Linux
d1a792f3b4 Update imx-sdma cyclic handling to report residue
I received a report this morning from one of the Novena developers that
the behaviour of the iMX6 ASoC codec driver (using imx-pcm-dma.c) was
sub-optimal under high system load.

While there are issues relating to system load remaining, upon reviewing
the ASoC imx-pcm-dma.c driver, it was noticed that it not using the
residue support, because SDMA doesn't support it.  This has the effect
that SDMA has to make multiple calls into the ASoC and ALSA code, one
for each period.

Since ALSA's snd_pcm_elapsed() does not need to be called multiple times
and it is entirely sufficient to call it once to update ALSA with the
current buffer position via the pointer method, we can do better here.
We can also avoid stopping the DMA entirely, just like real cyclic DMA
implementations behave.  While this means that we replay some old samples,
this is a nicer behaviour than having audio stop and restart.

The changes to achieve this are relatively minor - imx-sdma.c can track
where the DMA is to the nearest descriptor boundary - it does this
already when deciding how many callbacks to issue.  In doing this,
buf_tail always points at the descriptor which will complete next.

The residue is defined by the bytes remaining to the end of the buffer,
when the buffer is viewed as a single block of memory [start...end].
So, when we start out, there's a full buffer worth of residue, and this
counts down as we approach the end of the buffer, eventually becoming
zero at the end, before returning to the full buffer worth when we
wrap back to the start.

Moving the walking of the descriptors into the interrupt handler means
that we can update the BD_DONE flag at interrupt time, thus avoiding
a delayed tasklet stopping the cyclic DMA.

This means that the residue can be calculated from (total descriptors -
buf_tail) * descriptor size.  This is what the change below does.  We
update imx-pcm-dma.c to remove the NO_RESIDUE flag since we now provide
the residue.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
2014-07-01 12:23:42 +05:30
Mark Brown
28e48f0e26 Merge remote-tracking branches 'asoc/fix/fsl-dma', 'asoc/fix/fsl-spdif', 'asoc/fix/pxa', 'asoc/fix/rcar' and 'asoc/fix/sigmadsp' into asoc-linus 2014-06-16 16:05:16 +01:00
Guenter Roeck
3d5f615f9f ASoC: fsl: Fix build problem
Commit 432481220 (ASoC: fsl-ssi: Use regmap) removed struct ccsr_ssi.
Unfortunately, the structure is still used. This causes
mpc85xx_smp_defconfig and mpc85xx_defconfig builds to fail with

sound/soc/fsl/fsl_dma.c:926:50:
  error: invalid use of undefined type 'struct ccsr_ssi'
  dma->ssi_stx_phys = res.start + offsetof(struct ccsr_ssi, stx0);
ound/soc/fsl/fsl_dma.c:927:50:
  error: invalid use of undefined type 'struct ccsr_ssi'
  dma->ssi_srx_phys = res.start + offsetof(struct ccsr_ssi, srx0);

Fix by using constants, similar to original commit.

Cc: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-12 00:34:16 +01:00
Anssi Hannula
c89c7e94bb ASoC: fsl_spdif: Fix integer overflow when calculating divisors
The calculation code does
u64 = (u32 - u32) * 100000;

The 64 bits are of no help here as the type is casted only after the
multiplication, and therefore the result may overflow, possibly causing
inoptimal or wrong clock setup in an unfortunate case (the maximum
result value of the first substraction is currently 47999).

Fix the code to cast before multiplication.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Acked-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-09 21:00:42 +01:00
Nicolin Chen
e9b383dc94 ASoC: fsl_spdif: Fix incorrect usage of regmap_read()
We should not copy the return value into this val since it's supposed to
get the value of the register not the success result of regmap_read().
Thus fix it.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-09 21:00:23 +01:00
Mark Brown
1ecf44503b Merge remote-tracking branch 'asoc/topic/fsl-ssi' into asoc-next 2014-06-03 10:39:49 +01:00
Mark Brown
287d414eac Merge branch 'topic/fsl' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fsl-ssi
Conflicts:
	sound/soc/fsl/Kconfig
2014-06-01 14:02:07 +01:00
Alexander Shiyan
7b8751abdd ASoC: fsl: Remove dependencies of boards for SND_SOC_EUKREA_TLV320
Eukrea-i.MX51 board was converted to use DT, ie we no longer have a
MACH_EUKREA_MBIMXSD51_BASEBOARD symbol.
Transformation of other boards planned for the near future, so this
patch removes all these dependencies and restricts build of this
driver to ARCH_MXC.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 12:00:22 +01:00
Markus Pargmann
4324812201 ASoC: fsl-ssi: Use regmap
This patch replaces the ssi specific functions write_ssi, read_ssi and
write_ssi_mask by standard regmap function calls.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:55:08 +01:00
Markus Pargmann
737a6b418a ASoC: fsl-ssi: reorder and document fsl_ssi_private
Reorder all variables in struct fsl_ssi_private to have groups that make
sense together. The patch also updates the struct documentation.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:55:08 +01:00
Markus Pargmann
d429d8e332 ASoC: fsl-ssi: Fix baudclock handling
The baudclock may be used and set by different streams.

Allow only the first stream to set the bitclock rate. Other streams have
to try to get to the correct rate without modifying the bitclock rate
using the SSI internal clock modifiers.

The variable baudclk_streams is introduced to keep track of the active
streams that are using the baudclock. This way we know if the baudclock
may be set and whether we may enable/disable the clock.

baudclock enable/disable is moved to hw_params()/hw_free(). This way we can
keep track of the baudclock in those two functions and avoid a running
clock while it is not used. As hw_params()/hw_free() may be called
multiple times for the same stream, we have to use baudclk_streams
variable to know whether we may enable/disable the clock.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:55:08 +01:00
Sascha Hauer
b5dd91b3dc ASoC: fsl-ssi: Set framerate divider correctly for i2s master mode
In i2s master mode the fsl_ssi driver depends on someone calling
.set_tdm_slot correctly. In this mode though only a DC value of
2 is allowed, so set it in this case and no longer depend on
.set_tdm_slot.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:55:08 +01:00
Sascha Hauer
d8ced4793f ASoC: fsl-ssi: remove unnecessary spinlock
The baudclock_locked variable is only used in functions which
are serialized anyway from the core. No need to have a lock
around the variable, so remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:55:07 +01:00
Sascha Hauer
8dd51e23a1 ASoC: fsl-ssi: set bitclock in master mode from hw_params
The fsl_ssi driver uses the .set_sysclk callback to configure the
bitclock for master mode. This is unnecessary since the bitclock
is known in hw_params. This patch configures the bitclock from .hw_params.
.set_dai_sysclk now sets a bitclock frequency which is preferred over
the default calculated bitclock frequency.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:55:07 +01:00
Markus Pargmann
85e59af240 ASoC: fsl-ssi: make fsl,mode property optional
The simple soundcard binding has its own way for specifying the dai
format. To be able to use this binding we have to make the fsl,mode
property optional. As the property is used in existing devicetrees
keep the option around for compatibility reasons.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:55:07 +01:00
Sascha Hauer
fcdbadef37 ASoC: fsl-ssi: introduce SoC specific data
Introduce a SoC data struct which contains the differences between
the different SoCs this driver supports. This makes it easy to support
more differences without having to introduce a new switch/case each
time.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:55:07 +01:00
Fabio Estevam
b20e53a826 ASoC: fsl_ssi: Add suspend/resume support
Doing a suspend/resume sequence while playing an audio track in the backgroung
causes broken audio right after resume:

root@freescale /$ aplay clarinet.wav &

root@freescale /home$ Playing WAVE 'clarinet.wav' : Signed 16 bit Little Endian,
 Rate 44100 Hz, Mono

root@freescale /home$ echo mem > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.002 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
PM: suspend of devices complete after 37.082 msecs
PM: suspend devices took 0.040 seconds
PM: late suspend of devices complete after 4.234 msecs
PM: noirq suspend of devices complete after 4.618 msecs
Disabling non-boot CPUs ...
PM: noirq resume of devices complete after 4.013 msecs
PM: early resume of devices complete after 4.000 msecs
PM: resume of devices complete after 68.907 msecs
PM: resume devices took 0.070 seconds
Restarting tasks ... Suspended. Trying resume. Failed. Restarting stream. Done.
Suspended. Trying resume. Failed. Restarting stream. Done.
Suspended. Trying resume. Failed. Restarting stream. Done.
Suspended. Trying resume. Failed. Restarting stream. Done.
Suspended. Trying resume. Failed. Restarting stream. Done.
Suspended. Trying resume. Failed. Restarting stream. Done.
Suspended. Trying resume. Failed. Restarting stream. Done.
....

Add SNDRV_PCM_TRIGGER_RESUME/SUSPEND cases so that we can gracefully handle
system suspend/resume.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26 14:24:24 +01:00
Mark Brown
3a6a489fd8 Merge remote-tracking branches 'asoc/topic/devm', 'asoc/topic/fsl', 'asoc/topic/fsl-esai', 'asoc/topic/fsl-sai', 'asoc/topic/fsl-spdif' and 'asoc/topic/fsl-ssi' into asoc-next 2014-05-22 00:23:51 +01:00
Mark Brown
0c5dacf2ca Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42xx8' and 'asoc/topic/davinci' into asoc-next 2014-05-22 00:23:49 +01:00
Sascha Hauer
ee9daad495 ASoC: fsl-ssi: Move fsl_ssi_set_dai_sysclk above fsl_ssi_hw_params
fsl_ssi_set_dai_sysclk will be called from fsl_ssi_hw_params in the
next patch. Move up to avoid forward declaration and to keep the next patch
more readable. No functional change.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-20 23:05:03 +01:00
Markus Pargmann
504894799f ASoC: fsl-ssi: Transmit enable synchronization
When the fsl-ssi unit is used in i2s slave mode, it is possible that the
SSI unit starts transmitting data on the wrong channel. This happens
because the SSI does not synchronize with the left-right-clock by
default.

This patch enables transmit enable synchronization.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-20 23:04:11 +01:00
Markus Pargmann
171d683d2a ASoC: fsl-ssi: Remove unnecessary variables from ssi_private
There are some variables defined in struct fsl_ssi_private that describe
states that are also described by other variables.

This patch adds some helper functions that return exactly the same
information based on available variables. This helps to clean up struct
fsl_ssi_private and remove them from the probe function.

It also removes some not really used variables (new_binding, name).

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-20 23:02:46 +01:00
Markus Pargmann
4d9b7926f2 ASoC: fsl-ssi: Cleanup probe function
Reorder the probe function to be able to move the second imx-specific
block to the seperate imx probe function. The patch also removes some
comments/variables/code that are not used anymore or could be simply
replaced by other variables.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-20 23:02:42 +01:00
Markus Pargmann
ed0f1604e9 ASoC: fsl-ssi: Remove useless DMA code
Simplify dma DT property handling. fsl,ssi-dma-events is not used
anymore. It passes invalid data to imx_pcm_dma_params_init_data() which
copies some data into an imx dma struct. This struct is never used in
imx-dma or imx-sdma because of generic OF DMA handling. The
"fsl,ssi-dma-events" is not used anywhere in dts files.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-20 23:02:38 +01:00
Markus Pargmann
49da09e265 ASoC: fsl-ssi: Move imx-specific probe to seperate function
Move imx specific probe code to a seperate function. It reduces the
size of the probe() function and makes the code and error handling
easier to understand.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-20 23:02:34 +01:00
Markus Pargmann
2a1d102de4 ASoC: fsl-ssi: Use dev_name for DAI driver struct
Instead of creating a name using string manipulation functions, we can
simply use the device name for the DAI driver struct.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-20 23:02:31 +01:00
Markus Pargmann
f138e62124 ASoC: fsl-ssi: Move debugging to seperate file
Move all code that is only used for debugging to a seperate file. This
makes it easier to see what functions are used for debugging only.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-20 23:02:26 +01:00
Markus Pargmann
65c961cc59 ASoC: fsl-ssi: Fix register values when disabling
The bits we have to clear when disabling are different when the other
stream is still active.

This patch fixes the calculation of new register values after disabling
one stream. It also adds a more detailed description of the new register
value calculation.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-20 23:02:22 +01:00
Mark Brown
f9a405961e Merge remote-tracking branches 'asoc/fix/audmux', 'asoc/fix/cs42l52', 'asoc/fix/fsl-esai', 'asoc/fix/fsl-spdif', 'asoc/fix/rcar', 'asoc/fix/tlv320aic31xx' and 'asoc/fix/wm8962' into asoc-linus 2014-05-14 12:49:10 +01:00
Nicolin Chen
f975ca46f6 ASoC: fsl_esai: Bypass divider settings if clock requirement is not changed
We don't need to change those dividers if bclk and mclk remains the same
directions and values.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 23:15:25 +01:00
Nicolin Chen
4f8210f66e ASoC: fsl_esai: Set PCRC and PRRC registers at the end of hw_params()
According to Reference Manual -- ESAI Initialization chapter, as the
standard procedure of ESAI personal reset, the PCRC and PRRC registers
should be remained in its reset value and then configured after T/RCCR
and T/RCR configurations's done but before TE/RE's enabling.

So this patch moves PCRC and PRRC settings to the end of hw_params().

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 23:13:13 +01:00
Nicolin Chen
57ebbcafab ASoC: fsl_esai: Only bypass sck_div for EXTAL source
ESAI can only output EXTAL clock source directly. But for FSYS clock source,
ESAI can not output it without getting through PSR PM dividers.

So this patch adds an extra check in the code.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 23:13:13 +01:00
Nicolin Chen
89e47f62cf ASoC: fsl_esai: Fix incorrect condition within ratio range check for FP
The range here from 1 to 16 is confined to FP divider only while the
sck_div indicates if the calculation contains PSR and PM dividers. So
for the case using PSR and PM since the sck_div is true, the range of
ratio would simply become bigger than 16.

So this patch fixes the condition here and adds one line comments to
make the purpose here clear.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12 23:13:13 +01:00
Nicolin Chen
b8a832a0b6 ASoc: fsl_spdif: Add descriptions for fsl_spdif_priv
Other people would clearly understand each member and improve if they want.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:27:40 -07:00
Nicolin Chen
527cda78eb ASoC: fsl_spdif: Print actual sample rate for debug
People would simply know what the driver gets the best for the current
sample rate playback.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:27:39 -07:00
Nicolin Chen
27c647bff2 ASoC: fsl_spdif: Add sysclk df support to derive txclk from sysclk
The sysclk is one the clock sources that could be selected to derive
tx clock. But the route for sysclk is a bit different that it does
not only contain txclk df divider but also have an extra sysclk df.

So this patch mainly adds syclk df configuration support so as to
let the driver be able to get clock from sysclk.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:27:39 -07:00
Nicolin Chen
e41a4a79af ASoC: fsl_spdif: Rename all _div to _df
We should have used _df by following the reference manual at the beginning.
So this patch just renames them.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:27:39 -07:00
Mark Brown
af46929e6e Linux 3.15-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTZuYPAAoJEHm+PkMAQRiGC/wIAJhgGkofnbEv4x0QEXJuNQOv
 rXxId3RQpLQ2PGjJHbrYRvwyK9X7L+JREDJGMyKh8VCMHaYQ1safpI6KII+BvkVb
 9FxcledNEB4sDNiShsckG39iBGBAsi2R630XgygLoydfrvNnCrhPB5vi1TbWE37t
 xTsaMJxZncSZ6nMsO8w5klVhSOlBPGUp9cVLZhvKTR66eF4JGX3hZHVPwlpZZd2J
 ExhxmhnwBATuP3IexRyZ/3/J/zGdJJ9e5JLlEwdLo2hKVgqVosDu7teEucLGzZL1
 YdGz7Ndl+Ky9rG/RSuZSCfG7XF5DCroqcDNhT+sqvoTWXU0iunAjFIKavy3CxNA=
 =7moZ
 -----END PGP SIGNATURE-----

Merge tag 'v3.15-rc4' into asoc-fsl-spdif

Linux 3.15-rc4
2014-05-05 12:27:30 -07:00
Nicolin Chen
9c6344b3fa ASoC: fsl_spdif: Use clk_set_rate() for spdif root clock only
The clock mux for the Freescale S/PDIF controller has eight clock sources
while most of them are from other moudles and even system clocks that do
not allow a rate-changing operation.

So we here only allow the clk_set_rate() and clk_round_rate() happened to
spdif root clock, the private clock for S/PDIF controller.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:26:05 -07:00
Arnd Bergmann
31ee2bfd72 ASoC: fsl: select SND_SOC_IMX_PCM_DMA where needed
Since commit 204dec93ea "ASoC: fsl: Allow to select individual common
options", it is possible to enable SND_SOC_FSL_SSI and SND_SOC_FSL_SPDIF
manually, either as loadable modules or built-in. This unfortunately
leads to a link error if one or both of them are built-in, while
the imx-pcm-dma framework is a loadable module:

sound/built-in.o: In function `fsl_ssi_probe':
:(.text+0x51fb8): undefined reference to `imx_pcm_dma_init'
sound/built-in.o: In function `fsl_spdif_probe':
:(.text+0x52e20): undefined reference to `imx_pcm_dma_init'

This changes Kconfig to prevent this case by using 'select' to turn
on the imx-pcm-dma code from both drivers. For consistency, we also
turn on the imx-pcm-fiq code, which is an alternative to the dma
implementation.

Note that imx-pcm-fiq is platform dependent, so we must not enable
that unless we are building a kernel for i.MX. Note also the
"if SND_IMX_SOC != n" syntax as opposed to the normal "if SND_IMX_SOC".
This is needed to avoid turning on the options as 'm' if 'SND_IMX_SOC'
is a module.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 13:47:28 -07:00
Xiubo Li
40e3b934be ASoC: fsl: Allow to select ESAI device individually
This will be useful for out-of-tree drivers since in-tree drivers
could select it automatically.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 11:09:05 -07:00
Xiubo Li
b71fc4e6c9 ASoC: fsl: Allow to select SAI device individually
This will be useful for out-of-tree drivers since in-tree drivers
could select it automatically.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01 11:08:29 -07:00
Arnd Bergmann
a2915d4fef ASoC: CS42L51 and WM8962 codecs depend on INPUT
Building ARM randconfig got into a situation where CONFIG_INPUT
is turned off and SND_SOC_ALL_CODECS is turned on, which failed
for two codecs trying to use the input subsystem. Some other
drivers also select one of these codecs and consequently need an
explicit dependency added.

Appending to the dependency list seems the easiest way out,
since this is not a practical limitation. If anyone really
needs to build these codecs for a kernel with no input support,
a more sophisticated solution can be implemented.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-30 18:29:33 -07:00
Nicolin Chen
0b8643900a ASoC: fsl_spdif: Fix clock source for rxclk rate measurement
The rxclk rate actually uses sysclk, ipg clock for example, as its
reference clock to calculate it. But the driver currently doesn't
pass a correct clock source. So fix it.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-29 12:07:17 -07:00
Nicolin Chen
e9ffb5ba4d ASoC: fsl: Drop formats limitation for imx-pcm-dma.c
Now ASoC core is getting the intersection of supported formats not only
from CPU and CODEC dai's but also from DMA's. However, there should be
no specific width limitation from SDMA side.

So drop it. Otherwise, we would only support S16_LE format for all i.MX
platforms.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24 13:14:26 +01:00
Nicolin Chen
08f7336e64 ASoC: fsl_spdif: Add core clock control for DMA access
Regmap is able to enable/disable the core clock automatically each time
it's going to access the registers. But for DMA cases during playback or
recording, it's totally beyong control of regmap. So we have to open the
clock manually.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24 13:11:16 +01:00
Lars-Peter Clausen
b8909783a2 ASoC: imx-audmux: Fix section mismatch
audmux_debugfs_init() is marked as __init, but is called from imx_audmux_probe()
which is not marked as __init. This creates a section mismatch and a potential
runtime crash (if imx_audmux_probe() is called after the .init section was
dropped). This patch removes the __init annotation from audmux_debugfs_init(),
which fixes the following warning:
	WARNING: sound/soc/built-in.o(.text+0x86960): Section mismatch in reference
	from the function imx_audmux_probe() to the function
	.init.text:audmux_debugfs_init()

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24 11:22:53 +01:00
Nicolin Chen
6ae6698276 ASoC: fsl_spdif: Fix wrong OFFSET of STC_SYSCLK_DIV
It should use STC_SYSCLK_DIV_OFFSET. Thus fix it.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18 15:05:30 +01:00
Mark Brown
9c72a04ca7 ASoC: fsl: Add explicit include of of.h
Hopefully fixing a build failure reported by Stephen Rothwell - though
quite why the other OF headers don't include this as well I'm not sure.

Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-15 12:02:02 +01:00
Nicolin Chen
2a266f8b2a ASoC: fsl_sai: Use FSL_SAI_xXR() and regmap_update_bits() to simplify code
By doing this, the driver can drop around 50 lines and become neater.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14 21:46:46 +01:00