Commit graph

118 commits

Author SHA1 Message Date
Shengjiu Wang
1935050de0
ASoC: imx-audio-rpmsg: Add rpmsg_driver for audio channel
This driver is used to accept the message from rpmsg audio
channel, and if this driver is probed, it will help to register
the platform driver, the platform driver will use this
audio channel to send and receive messages to and from Cortex-M
core.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1615516725-4975-5-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-25 13:58:09 +00:00
Shengjiu Wang
b73d9e6225
ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg
This is a cpu dai driver for rpmsg audio use case,
which is mainly used for getting the user's configuration
from devicetree and configure the clocks which is used by
Cortex-M core.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1615516725-4975-3-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-03-25 13:58:07 +00:00
Arnd Bergmann
a1f31cc4e9
ASoC: fsl_aud2htx: select SND_SOC_IMX_PCM_DMA
The newly added driver requires DMA support and fails to build
when that is disabled:

aarch64-linux-ld: sound/soc/fsl/fsl_aud2htx.o: in function `fsl_aud2htx_probe':
fsl_aud2htx.c:(.text+0x3e0): undefined reference to `imx_pcm_dma_init'

Fixes: 8a24c834c0 ("ASoC: fsl_aud2htx: Add aud2htx module driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20210103135327.3630973-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-01-04 14:25:00 +00:00
Shengjiu Wang
6a5f850aa8
ASoC: fsl: Add imx-hdmi machine driver
The driver is initially designed for sound card using HDMI
interface on i.MX platform. There is internal HDMI IP or
external HDMI modules connect with SAI or AUD2HTX interface.
It supports both transmitter and receiver devices.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1607251319-5821-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-08 14:20:35 +00:00
Shengjiu Wang
c61d1142cf
ASoC: fsl: Fix config name of CONFIG_ARCH_MXC
CONFIG_ARCH_MXC should be ARCH_MXC

Fixes: 674226db62 ("ASoC: fsl: SND_SOC_FSL_AUD2HTX should depend on ARCH_MXC")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1606371293-29099-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:08:12 +00:00
Geert Uytterhoeven
674226db62
ASoC: fsl: SND_SOC_FSL_AUD2HTX should depend on ARCH_MXC
The Freescale/NXP AUDIO TO HDMI TX module is only present on NXP i.MX 8
Series SoCs.  Hence add a dependency on ARCH_MXC, to prevent asking the
user about this driver when configuring a kernel without i.MX 8 platform
support.

Fixes: 8a24c834c0 ("ASoC: fsl_aud2htx: Add aud2htx module driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20201110145120.3280658-1-geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-17 17:08:43 +00:00
Fabio Estevam
c31da0b196
ASoC: imx-ssi: Remove unused driver
The imx-ssi driver was only used by i.MX non-DT platforms.

Since 5.10-rc1, i.MX has been converted to a DT-only platform and all
board files are gone.

Remove the imx-ssi audio driver as there are no more users at all.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-6-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 19:35:42 +00:00
Fabio Estevam
ffc64110b7
ASoC: fsl: eukrea: Remove the SND_SOC_IMX_SSI selection
SND_SOC_IMX_SSI was only used by i.MX non-DT platforms.

SND_SOC_EUKREA_TLV320 already selects the SND_SOC_FSL_SSI symbol,
which is enough.

Remove the unneeded SND_SOC_IMX_SSI selection.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-5-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 19:35:41 +00:00
Fabio Estevam
83e7e22786
ASoC: imx-mc13783: Remove unused driver
The imx-mc13783 was used on imx27-pdk and imx31-pdk non-DT platforms.

Since 5.10-rc1, i.MX has been converted to a DT-only platform and all
board files are gone.

Remove the imx-mc13783 audio machine driver as there is no user at all.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-4-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 19:35:40 +00:00
Fabio Estevam
440534a0ec
ASoC: phycore-ac97: Remove unused driver
Since commit e1324ece2a ("ARM: imx: Remove i.MX35 board files"), the
MACH_PCM043 and MACH_PCA100 non-DT platform are no longer supported,
so get rid of their machine audio driver too.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-3-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 19:35:40 +00:00
Fabio Estevam
3fbb01fb58
ASoC: mx27vis-aic32x4: Remove unused driver
Since commit 879c0e5e0a ("ARM: imx: Remove i.MX27 board files"), the
MACH_IMX27_VISSTRIM_M10 non-DT platform is no longer supported,
so get rid of its machine audio driver too.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-2-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 19:35:39 +00:00
Fabio Estevam
9c9fd07eb4
ASoC: wm1133-ev1: Remove unused driver
Since commit c93197b004 ("ARM: imx: Remove i.MX31 board files"), the
MACH_MX31ADS_WM1133_EV1 non-DT platform is no longer supported,
so get rid of its machine audio driver too.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20201110203937.25684-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-12 19:35:38 +00:00
Shengjiu Wang
8a24c834c0
ASoC: fsl_aud2htx: Add aud2htx module driver
The AUD2HTX is a digital module that provides a bridge between
the Audio Subsystem and the HDMI RTX Subsystem. This module
includes intermediate storage to queue SDMA transactions prior
to being synchronized and passed to the HDMI RTX Subsystem over
the Audio Link.

The AUD2HTX contains a DMA request routed to the SDMA module.
This DMA request is controlled based on the watermark level in
the 32-entry sample buffer.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1604281947-26874-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-05 17:06:16 +00:00
Viorel Suman
2856448686
ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver
XCVR (Audio Transceiver) is a on-chip functional module found
on i.MX8MP. It support HDMI2.1 eARC, HDMI1.4 ARC and SPDIF.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20201013121733.83684-2-viorel.suman@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-26 15:45:31 +00:00
Matthias Schiffer
b507475588
ASoC: fsl-asoc-card: add support for TLV320AIC32x4 codec
The TLV320AIC32x4 is commonly used on TQ-Systems starterkit mainboards
for i.MX-based SoMs (i.MX6Q/DL, i.MX6UL, i.MX7) and LS1021A.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20200821071153.7317-2-matthias.schiffer@ew.tq-group.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-21 15:24:40 +01:00
Shengjiu Wang
3b17119449
ASoC: fsl-asoc-card: Support Headphone and Microphone Jack detection
Use asoc_simple_init_jack function from simple card to implement
the Headphone and Microphone detection.
Register notifier to disable Speaker when Headphone is plugged in
and enable Speaker when Headphone is unplugged.
Register notifier to disable Digital Microphone when Analog Microphone
is plugged in and enable DMIC when Analog Microphone is unplugged.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/1594822179-1849-4-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-16 23:24:14 +01:00
Shengjiu Wang
955ac62405
ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers
EASRC (Enhanced Asynchronous Sample Rate Converter) is a new IP module
found on i.MX8MN. It is different with old ASRC module.

The primary features for the EASRC are as follows:
- 4 Contexts - groups of channels with an independent time base
- Fully independent and concurrent context control
- Simultaneous processing of up to 32 audio channels
- Programmable filter charachteristics for each context
- 32, 24, 20, and 16-bit fixed point audio sample support
- 32-bit floating point audio sample support
- 8kHz to 384kHz sample rate
- 1/16 to 8x sample rate conversion ratio

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/260d7a9fbddf9fa90760d30095df60a4c25fd0a1.1587038908.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-04-21 16:34:11 +01:00
Shengjiu Wang
9e28f6532c
ASoC: fsl_mqs: Add MQS component driver
MQS (medium quality sound), is used to generate medium quality
audio via a standard digital output pin. It can be used to
connect stereo speakers or headphones simply via power amplifier
stages without an additional DAC chip. It only accepts 2-channel,
LSB-valid 16bit, MSB shift-out first, frame sync asserting with
the first bit of the frame, data shifted with the posedge of
bit clock, 44.1 kHz or 48 kHz signals from SAI1 in left justified
format; and it provides the SNR target as no more than 20dB for
the signals below 10 kHz. The signals above 10 kHz will have
worse THD+N values.

MQS provides only simple audio reproduction. No internal pop,
click or distortion artifact reduction methods are provided.

The MQS receives the audio data from the SAI1 Tx section.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/74dfc73a92d2df4213225abe7d2a3db82672fe0f.1568367274.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-01 12:08:38 +01:00
Thomas Gleixner
ec8f24b7fa treewide: Add SPDX license identifier - Makefile/Kconfig
Add SPDX license identifiers to all Make/Kconfig files which:

 - Have no license information of any form

These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:

  GPL-2.0-only

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21 10:50:46 +02:00
Arnd Bergmann
ea751227c8
ASoC: imx: fix fiq dependencies
During randconfig builds, I occasionally run into an invalid configuration
of the freescale FIQ sound support:

WARNING: unmet direct dependencies detected for SND_SOC_IMX_PCM_FIQ
  Depends on [m]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_IMX_SOC [=m]
  Selected by [y]:
  - SND_SOC_FSL_SPDIF [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_IMX_SOC [=m]!=n && (MXC_TZIC [=n] || MXC_AVIC [=y])

sound/soc/fsl/imx-ssi.o: In function `imx_ssi_remove':
imx-ssi.c:(.text+0x28): undefined reference to `imx_pcm_fiq_exit'
sound/soc/fsl/imx-ssi.o: In function `imx_ssi_probe':
imx-ssi.c:(.text+0xa64): undefined reference to `imx_pcm_fiq_init'

The Kconfig warning is a result of the symbol being defined inside of
the "if SND_IMX_SOC" block, and is otherwise harmless. The link error
is more tricky and happens with SND_SOC_IMX_SSI=y, which may or may not
imply FIQ support. However, if SND_SOC_FSL_SSI is set to =m at the same
time, that selects SND_SOC_IMX_PCM_FIQ as a loadable module dependency,
which then causes a link failure from imx-ssi.

The solution here is to make SND_SOC_IMX_PCM_FIQ built-in whenever
one of its potential users is built-in.

Fixes: ff40260f79 ("ASoC: fsl: refine DMA/FIQ dependencies")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-02 10:46:04 +09:00
Viorel Suman
b86ef53677
ASoC: fsl: Add Audio Mixer machine driver
This patch implements Audio Mixer machine driver for NXP iMX8 SOCs.
It connects together Audio Mixer and related SAI instances.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-26 14:07:51 +00:00
Viorel Suman
be1df61cf0
ASoC: fsl: Add Audio Mixer CPU DAI driver
This patch implements Audio Mixer CPU DAI driver for NXP iMX8 SOCs.
The Audio Mixer is a on-chip functional module that allows mixing of
two audio streams into a single audio stream.

Audio Mixer datasheet is available here:
https://www.nxp.com/docs/en/reference-manual/IMX8DQXPRM.pdf

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-26 14:07:35 +00:00
Cosmin Samoila
47a70e6fc9
ASoC: Add MICFIL SoC Digital Audio Interface driver.
Add Digital Audio Interface driver that convers PDM bitstream to PCM
format.

Features:
- Fixed filtering characteristics for audio application.
- Full or partial set of channels operation with individual enable control.
- Programmable PDM clock generator.
- Programmable decimation rate.
- 16-bit signed output result.
- Overall stopband attenuation more than 80dB.
- Overall passband ripple less than 0.2dB.

Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-07 17:00:55 +00:00
Fabio Estevam
add6883619
ASoC: fsl: Fix SND_SOC_EUKREA_TLV320 build error on i.MX8M
eukrea-tlv320.c machine driver runs on non-DT platforms
and include <asm/mach-types.h> header file in order to be able
to use some machine_is_eukrea_xxx() macros.

Building it for ARM64 causes the following build error:

sound/soc/fsl/eukrea-tlv320.c:28:10: fatal error: asm/mach-types.h: No such file or directory

Avoid this error by not allowing to build the SND_SOC_EUKREA_TLV320
driver when ARM64 is selected.

This is needed in preparation for the i.MX8M support.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-13 11:01:51 +00:00
Fabio Estevam
790d631dcf
ASoC: imx-wm8962: Remove machine driver
fsl-asoc-card machine driver also handles wm8962, so there is
really no need for keeping the dedicated imx-wm8962 driver anymore.

Remove the imx-wm8962 machine driver.

Suggested-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-27 10:40:08 +00:00
Randy Dunlap
b3af6d3f96 ASoC: fsl: fix fsl_spdif.c build errors
Fix build errors in sound/soc/fsl/fsl_spdif.c by selecting BITREVERSE.
Fixes these build errors:

sound/built-in.o: In function `spdif_write_channel_status':
fsl_spdif.c:(.text+0xbe39d): undefined reference to `byte_rev_table'
fsl_spdif.c:(.text+0xbe3a8): undefined reference to `byte_rev_table'
fsl_spdif.c:(.text+0xbe3be): undefined reference to `byte_rev_table'
fsl_spdif.c:(.text+0xbe3d8): undefined reference to `byte_rev_table'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-09 14:44:43 +00:00
Sudip Mukherjee
121a01521b ASoC: fsl: fix build failure
m32r allmodconfig build is failing with the error:
ERROR: "bad_dma_ops" [sound/soc/fsl/snd-soc-fsl-asrc.ko] undefined!

The code is using DMA but the related dependency is not mentioned in the
Kconfig.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-03 00:28:15 +01:00
Felipe F. Tonello
57e756d302 ASoC: fsl-asoc-card: add cs4271 and cs4272 support
add cs4271 and cs42727 support for fsl-asoc-card

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-02-05 13:32:40 +00:00
Arnd Bergmann
ab07eaedb7 ASoC: fsl: clarify ac97 dependency
A new randconfig build failure shows that the fsl-asoc-card module
must not be built-in when the AC97 driver is a loadable module:

sound/built-in.o: In function `fsl_asoc_card_late_probe':
:(.text+0x571d8): undefined reference to `snd_ac97_update_bits'

I couldn't come up with a nice solution, so this adds another dependency
on "X || !X", which is the Kconfig way of saying that we have an
optional dependency on something that might be a loadable module.

Fixes: 50760cad9d ("ASoC: fsl-asoc-card: add AC'97 support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-25 11:56:10 +00:00
Fabio Estevam
1169006b05 ASoC: fsl: Add the audio interface acronyms in Kconfig text
To keep consistency with the other Kconfig entries, use the audio
interface acronyms (SSI and SPDIF) in the Kconfig menu text.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10 18:30:53 +01:00
Mark Brown
565fefdf31 Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/dmic', 'asoc/topic/drivers', 'asoc/topic/es8328' and 'asoc/topic/fsl' into asoc-next 2014-10-06 12:48:57 +01:00
Fabio Estevam
c05a11f7b8 ASoC: fsl: Do not force codecs selection by SND_SOC_FSL_ASOC_CARD
The wm8962 driver uses the input subsystem, but it is selected by
SND_SOC_FSL_ASOC_CARD, which can be built with CONFIG_INPUT disabled,
resulting in this link error:

ERROR: "input_event" [sound/soc/codecs/snd-soc-wm8962.ko] undefined!
ERROR: "input_register_device" [sound/soc/codecs/snd-soc-wm8962.ko] undefined!
ERROR: "devm_input_allocate_device" [sound/soc/codecs/snd-soc-wm8962.ko] undefined!

Do not force the selection of the codecs by SND_SOC_FSL_ASOC_CARD to avoid
such problem.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-01 17:07:05 +01:00
Mark Brown
5b87d31309 Merge branch 'topic/fsl' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-fsl-esai 2014-09-01 10:49:32 +01:00
Shengjiu Wang
38c6e4bb67 ASoC: fsl-asoc-card: move 'config SND_SOC_FSL_ASOC_CARD' to 'if SND_IMX_SOC'
Build kernel with SND_SOC_FSL_ASOC_CARD=m && SND_SOC_FSL_{SSI,SAI,ESAI}=y
leads the following error:

   sound/built-in.o: In function `fsl_sai_probe':
>> fsl_sai.c:(.text+0x5f662): undefined reference to `imx_pcm_dma_init'
   sound/built-in.o: In function `fsl_esai_probe':
>> fsl_esai.c:(.text+0x6044b): undefined reference to `imx_pcm_dma_init'

The config SND_SOC_FSL_ASOC_CARD is for IMX SOC, So move it under condition
of 'if SND_IMX_SOC'.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 11:11:50 -05:00
Sean Cross
cdec729765 ASoC: fsl: Fix building of imx-es8328 on PPC
The imx-es8328 driver fails to build on PPC because it explicitly depends on
SND_SOC_IMX_PCM_FIQ, which itself doesn't build on PPC.  Instead, rely on
the SND_SOC_FSL_SSI config option to pull in the necessary libraries.

While we're at it, remove SND_SOC_FSL_UTILS, which also is not needed.

Signed-off-by: Sean Cross <xobs@kosagi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19 10:43:45 -05:00
Shengjiu Wang
499898d66d ASoC: fsl: fsl-asoc-card: Select SND_SOC_IMX_AUDMUX
Building kernel with SND_SOC_IMX_AUDMUX=n leads to the following error:

   sound/built-in.o: In function `fsl_asoc_card_probe':
>> fsl-asoc-card.c:(.text+0x1467b5): undefined reference to `imx_audmux_v2_configure_port'
>> fsl-asoc-card.c:(.text+0x1467d0): undefined reference to `imx_audmux_v2_configure_port'
>> fsl-asoc-card.c:(.text+0x1467ed): undefined reference to `imx_audmux_v2_configure_port'
>> fsl-asoc-card.c:(.text+0x146807): undefined reference to `imx_audmux_v2_configure_port'

Update Kconfig to select SND_SOC_IMX_AUDMUX when SND_SOC_FSL_ASOC_CARD=y.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-18 09:54:04 -05:00
Sean Cross
7e7292dba2 ASoC: fsl: add imx-es8328 machine driver
This adds an initial machine driver for the ES8328 audio codec on Freescale
boards.  The driver supports headphones and an audio regulator for an onboard
speaker amp.

Signed-off-by: Sean Cross <xobs@kosagi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:18:07 -05:00
Nicolin Chen
708b4351f0 ASoC: fsl: Add Freescale Generic ASoC Sound Card with ASRC support
The Freescale Generic ASoC Sound Card is a general ASoC DAI Link driver that
can be used, ideally, for all Freescale CPU DAI drivers and external CODECs.

The idea of this generic sound card is a bit like ASoC Simple Card. However,
for Freescale SoCs (especially those released in recent years), most of them
have ASRC (Documentation/devicetree/bindings/sound/fsl,asrc.txt) inside. And
this is a specific feature that might be painstakingly controlled and merged
into the Simple Card driver.

So having this driver will allow all Freescale SoC users to benefit from the
simplification to support a new card and the capability of wide sample rates
support through ASRC.

The driver is initially designed for sound card using I2S or PCM DAI formats.
However, it's also possible to merge those non-I2S/PCM type sound cards, such
as S/PDIF audio and HDMI audio, into this card as long as the merge will not
break the original function and as long as there is something redundant that
can be abstracted along with I2S type sound cards.

As an initial version, it only supports three cards that I can test:
imx-audio-cs42888, a new card that links ESAI with CS42888 CODEC
imx-audio-sgtl5000, just like the old imx-sgtl5000.c driver
imx-audio-wm8962, just like the old imx-wm8962.c driver

The driver is also compatible with the old Device Tree bindings of WM8962 and
SGTL5000. So we may consider to remove those two drivers after this driver is
totally enabled. (It needs to be added into defconfig)

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16 17:03:50 -05:00
Shengjiu Wang
769091ee18 ASoC: fsl-esai: Revert .xlate_tdm_slot_mask() support
This reverts commit a603c8ee52.

fsl_asoc_xlate_tdm_slot_mask() is different with snd_soc_xlate_tdm_slot_mask().
fsl_asoc_xlate_tdm_slot_mask() will set the enabled bit to 0, disabled bit
to 1. snd_soc_xlate_tdm_slot_mask() will set the enabled bit to 1, disabled
bit to 0.
For esai when the bit value is 1, the slot is enabled, when the bit value is 0,
the slot is disabled. If using fsl_asoc_xlate_tdm_slot_mask(), the esai will
work abnormally. So revert this patch, make the esai use default function.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-13 19:50:00 +01:00
Mark Brown
e7177999dc Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-asrc', 'asoc/topic/fsl-spdif' and 'asoc/topic/imx-audmux' into asoc-next 2014-08-04 16:31:40 +01:00
Fabio Estevam
bdb9eb4967 ASoC: fsl: fsl_asrc: Select SND_SOC_GENERIC_DMAENGINE_PCM
Building a kernel with SND_SOC_GENERIC_DMAENGINE_PCM=n leads to the following
error:

ERROR: "snd_dmaengine_pcm_prepare_slave_config" [sound/soc/fsl/snd-soc-fsl-asrc.ko] undefined!

Let SND_SOC_FSL_ASRC select SND_SOC_GENERIC_DMAENGINE_PCM in order to fix such
error.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31 00:04:23 +01:00
Nicolin Chen
3117bb3109 ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers
The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a
signal associated with an input clock into a signal associated with a different
output clock. The driver currently works as a Front End of DPCM with other Back
Ends DAI links such as ESAI<->CS42888 and SSI<->WM8962 and SAI. It converts the
original sample rate to a common rate supported by Back Ends for playback while
converts the common rate of Back Ends to a desired rate for capture. It has 3
pairs to support three different substreams within totally 10 channels.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Reviewed-by: Varka Bhadram <varkabhadram@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-29 19:22:49 +01:00
Arnd Bergmann
ff40260f79 ASoC: fsl: refine DMA/FIQ dependencies
Commit 31ee2bfd72 ("ASoC: fsl: select SND_SOC_IMX_PCM_DMA
where needed") started selecting SND_SOC_IMX_PCM_DMA and
SND_SOC_IMX_PCM_FIQ for two drivers when building for i.MX.
This has turned out too aggressive, as FIQ is only available
for i.mx2 through i.mx5, but not i.mx6 or vybrid.

Further, two more drivers have become user-selectable in the
meantime, and they both depend on DMA for the imx platform
as well.

This changes the selection of FIQ to depend on the TZIC or
AVIC interrupt controllers that actually export the imx
specific FIQ interfaces, and adds the missing select statements
for SAI and ESAI.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-22 11:57:10 +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
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
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