diff options
author | Francois Mazard <f-mazard@ti.com> | 2011-03-01 17:03:51 +0100 |
---|---|---|
committer | Dan Murphy <dmurphy@ti.com> | 2011-04-14 13:40:13 -0500 |
commit | 375674ac289a40bedacb2f908ed4582f767f1f18 (patch) | |
tree | 76e4940400470fa4f4903a1f86d913eae1fb6a7d /sound | |
parent | cf70a74daa870bdbf857e15623faa250e5dddf3d (diff) |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | 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 42eeac578088..e0c81de45e56 100644 --- a/sound/soc/omap/Kconfig +++ b/sound/soc/omap/Kconfig @@ -18,6 +18,9 @@ config SND_OMAP_SOC_ABE config SND_OMAP_SOC_DMIC 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 @@ -118,6 +121,7 @@ config SND_OMAP_SOC_SDP4430 select SND_SOC_DMIC select SND_OMAP_SOC_DMIC select SND_OMAP_SOC_ABE_DSP + 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 b257dfcba66d..b6ae9c2b390c 100644 --- a/sound/soc/omap/Makefile +++ b/sound/soc/omap/Makefile @@ -6,6 +6,7 @@ snd-soc-omap-mcbsp-objs := omap-mcbsp.o snd-soc-omap-mcpdm-objs := omap-mcpdm.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_ABE) += snd-soc-omap-abe.o obj-$(CONFIG_SND_OMAP_SOC) += snd-soc-omap.o @@ -14,6 +15,7 @@ obj-$(CONFIG_SND_OMAP_SOC_MCBSP) += snd-soc-omap-mcbsp.o obj-$(CONFIG_SND_OMAP_SOC_MCPDM) += snd-soc-omap-mcpdm.o obj-$(CONFIG_SND_OMAP_SOC_HDMI) += snd-soc-omap-hdmi.o obj-$(CONFIG_SND_OMAP_SOC_ABE_DSP) += snd-soc-omap-abe-dsp.o abe/ +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 000000000000..e4034e715deb --- /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"); |