diff options
author | Francois Mazard <f-mazard@ti.com> | 2011-03-01 17:03:51 +0100 |
---|---|---|
committer | Ziyann <jaraidaniel@gmail.com> | 2014-10-01 12:56:46 +0200 |
commit | a70ee9e04988cffc96bfa40989857c3943fabb90 (patch) | |
tree | fd5a3d94c13296abb0c580a71dd6f0a4410834cf /sound/soc | |
parent | 4536984beccdb0beb0ca011d81ee609a7babc383 (diff) | |
download | kernel_samsung_tuna-a70ee9e04988cffc96bfa40989857c3943fabb90.zip kernel_samsung_tuna-a70ee9e04988cffc96bfa40989857c3943fabb90.tar.gz kernel_samsung_tuna-a70ee9e04988cffc96bfa40989857c3943fabb90.tar.bz2 |
ASoc: ABE VxREC: Create VxREC CPU DAI
VxREC DAI represents the Vx_REC input of the ROUTE_UL.
Vx_REC can be mono or stereo input even it mixes
different inputs such as Vx_UL, Vx_DL, TONES_DL and MM_DL
Change-Id: I7b67d7472bf500f89865953054f740844c1166a5
Signed-off-by: Francois Mazard <f-mazard@ti.com>
Signed-off-by: Pierre Moos <p-moos@ti.com>
Conflicts:
sound/soc/omap/Kconfig
Diffstat (limited to 'sound/soc')
-rwxr-xr-x | sound/soc/omap/Kconfig | 4 | ||||
-rw-r--r-- | sound/soc/omap/Makefile | 2 | ||||
-rw-r--r-- | sound/soc/omap/omap-vxrec.c | 83 |
3 files changed, 89 insertions, 0 deletions
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig index 5fd8a31..5a6119e 100755 --- a/sound/soc/omap/Kconfig +++ b/sound/soc/omap/Kconfig @@ -26,6 +26,9 @@ config SND_OMAP_SOC_DMIC config SND_OMAP_SOC_HDMI tristate +config SND_OMAP_SOC_VXREC + tristate + config SND_OMAP_SOC_N810 tristate "SoC Audio support for Nokia N810" depends on SND_OMAP_SOC && MACH_NOKIA_N810 && I2C @@ -120,6 +123,7 @@ config SND_OMAP_SOC_SDP4430 select SND_OMAP_SOC_ABE_DSP select SND_OMAP_SOC_MCASP select SND_OMAP_SOC_SPDIF + select SND_OMAP_SOC_VXREC help Say Y if you want to add support for SoC audio on Texas Instruments SDP4430 or PandaBoard. diff --git a/sound/soc/omap/Makefile b/sound/soc/omap/Makefile index 8b044f7..215e3c6 100644 --- a/sound/soc/omap/Makefile +++ b/sound/soc/omap/Makefile @@ -7,6 +7,7 @@ snd-soc-omap-dmic-objs := omap-dmic.o snd-soc-omap-abe-objs := omap-abe.o snd-soc-omap-abe-dsp-objs := omap-abe-dsp.o snd-soc-omap-hdmi-objs := omap-hdmi.o +snd-soc-omap-vxrec-objs := omap-vxrec.o obj-$(CONFIG_SND_OMAP_SOC) += snd-soc-omap.o obj-$(CONFIG_SND_OMAP_SOC_MCASP) += snd-soc-omap-mcasp.o @@ -16,6 +17,7 @@ obj-$(CONFIG_SND_OMAP_SOC_DMIC) += snd-soc-omap-dmic.o obj-$(CONFIG_SND_OMAP_SOC_ABE) += snd-soc-omap-abe.o obj-$(CONFIG_SND_OMAP_SOC_ABE_DSP) += snd-soc-omap-abe-dsp.o abe/ obj-$(CONFIG_SND_OMAP_SOC_HDMI) += snd-soc-omap-hdmi.o +obj-$(CONFIG_SND_OMAP_SOC_VXREC) += snd-soc-omap-vxrec.o # OMAP Machine Support snd-soc-n810-objs := n810.o diff --git a/sound/soc/omap/omap-vxrec.c b/sound/soc/omap/omap-vxrec.c new file mode 100644 index 0000000..e4034e7 --- /dev/null +++ b/sound/soc/omap/omap-vxrec.c @@ -0,0 +1,83 @@ +/* + * omap-vxrec.c -- OMAP ASoC VXREC DAI driver + * + * Copyright (C) 2011 Texas Instruments + * + * Author: Francois Mazard <f-mazard@ti.com> +* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#undef DEBUG + +#include <linux/module.h> +#include <linux/platform_device.h> + +#include <sound/soc.h> + +static struct snd_soc_dai_driver omap_vxrec_dai[] = { +{ + .name = "omap-abe-vxrec-dai", + .capture = { + .channels_min = 1, + .channels_max = 2, + .rates = SNDRV_PCM_RATE_48000, + .formats = SNDRV_PCM_FMTBIT_S32_LE, + }, +}, +}; + +static __devinit int asoc_vxrec_probe(struct platform_device *pdev) +{ + int ret; + + ret = snd_soc_register_dais(&pdev->dev, omap_vxrec_dai, + ARRAY_SIZE(omap_vxrec_dai)); + + return ret; +} + +static int __devexit asoc_vxrec_remove(struct platform_device *pdev) +{ + snd_soc_unregister_dai(&pdev->dev); + + return 0; +} + +static struct platform_driver asoc_vxrec_driver = { + .driver = { + .name = "omap-abe-vxrec-dai", + .owner = THIS_MODULE, + }, + .probe = asoc_vxrec_probe, + .remove = __devexit_p(asoc_vxrec_remove), +}; + +static int __init snd_omap_vxrec_init(void) +{ + return platform_driver_register(&asoc_vxrec_driver); +} +module_init(snd_omap_vxrec_init); + +static void __exit snd_omap_vxrec_exit(void) +{ + platform_driver_unregister(&asoc_vxrec_driver); +} +module_exit(snd_omap_vxrec_exit); + +MODULE_AUTHOR("Francois Mazard <f-mazard@ti.com>"); +MODULE_DESCRIPTION("OMAP VxREC SoC Interface"); +MODULE_LICENSE("GPL"); |