diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/Kconfig | 4 | ||||
-rw-r--r-- | sound/soc/codecs/Makefile | 2 | ||||
-rw-r--r-- | sound/soc/codecs/omap-hdmi.c | 69 | ||||
-rw-r--r-- | sound/soc/omap/Kconfig | 1 |
4 files changed, 76 insertions, 0 deletions
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 22c686444633..1e1613a438dd 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig | |||
@@ -46,6 +46,7 @@ config SND_SOC_ALL_CODECS | |||
46 | select SND_SOC_MAX9877 if I2C | 46 | select SND_SOC_MAX9877 if I2C |
47 | select SND_SOC_MC13783 if MFD_MC13XXX | 47 | select SND_SOC_MC13783 if MFD_MC13XXX |
48 | select SND_SOC_ML26124 if I2C | 48 | select SND_SOC_ML26124 if I2C |
49 | select SND_SOC_OMAP_HDMI_CODEC if OMAP4_DSS_HDMI | ||
49 | select SND_SOC_PCM3008 | 50 | select SND_SOC_PCM3008 |
50 | select SND_SOC_RT5631 if I2C | 51 | select SND_SOC_RT5631 if I2C |
51 | select SND_SOC_SGTL5000 if I2C | 52 | select SND_SOC_SGTL5000 if I2C |
@@ -236,6 +237,9 @@ config SND_SOC_MAX98095 | |||
236 | config SND_SOC_MAX9850 | 237 | config SND_SOC_MAX9850 |
237 | tristate | 238 | tristate |
238 | 239 | ||
240 | config SND_SOC_OMAP_HDMI_CODEC | ||
241 | tristate | ||
242 | |||
239 | config SND_SOC_PCM3008 | 243 | config SND_SOC_PCM3008 |
240 | tristate | 244 | tristate |
241 | 245 | ||
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index a9663e9c375b..fc27fec39487 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile | |||
@@ -33,6 +33,7 @@ snd-soc-max98095-objs := max98095.o | |||
33 | snd-soc-max9850-objs := max9850.o | 33 | snd-soc-max9850-objs := max9850.o |
34 | snd-soc-mc13783-objs := mc13783.o | 34 | snd-soc-mc13783-objs := mc13783.o |
35 | snd-soc-ml26124-objs := ml26124.o | 35 | snd-soc-ml26124-objs := ml26124.o |
36 | snd-soc-omap-hdmi-codec-objs := omap-hdmi.o | ||
36 | snd-soc-pcm3008-objs := pcm3008.o | 37 | snd-soc-pcm3008-objs := pcm3008.o |
37 | snd-soc-rt5631-objs := rt5631.o | 38 | snd-soc-rt5631-objs := rt5631.o |
38 | snd-soc-sgtl5000-objs := sgtl5000.o | 39 | snd-soc-sgtl5000-objs := sgtl5000.o |
@@ -143,6 +144,7 @@ obj-$(CONFIG_SND_SOC_MAX98095) += snd-soc-max98095.o | |||
143 | obj-$(CONFIG_SND_SOC_MAX9850) += snd-soc-max9850.o | 144 | obj-$(CONFIG_SND_SOC_MAX9850) += snd-soc-max9850.o |
144 | obj-$(CONFIG_SND_SOC_MC13783) += snd-soc-mc13783.o | 145 | obj-$(CONFIG_SND_SOC_MC13783) += snd-soc-mc13783.o |
145 | obj-$(CONFIG_SND_SOC_ML26124) += snd-soc-ml26124.o | 146 | obj-$(CONFIG_SND_SOC_ML26124) += snd-soc-ml26124.o |
147 | obj-$(CONFIG_SND_SOC_OMAP_HDMI_CODEC) += snd-soc-omap-hdmi-codec.o | ||
146 | obj-$(CONFIG_SND_SOC_PCM3008) += snd-soc-pcm3008.o | 148 | obj-$(CONFIG_SND_SOC_PCM3008) += snd-soc-pcm3008.o |
147 | obj-$(CONFIG_SND_SOC_RT5631) += snd-soc-rt5631.o | 149 | obj-$(CONFIG_SND_SOC_RT5631) += snd-soc-rt5631.o |
148 | obj-$(CONFIG_SND_SOC_SGTL5000) += snd-soc-sgtl5000.o | 150 | obj-$(CONFIG_SND_SOC_SGTL5000) += snd-soc-sgtl5000.o |
diff --git a/sound/soc/codecs/omap-hdmi.c b/sound/soc/codecs/omap-hdmi.c new file mode 100644 index 000000000000..1bf5c74f5f96 --- /dev/null +++ b/sound/soc/codecs/omap-hdmi.c | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * ALSA SoC codec driver for HDMI audio on OMAP processors. | ||
3 | * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ | ||
4 | * Author: Ricardo Neri <ricardo.neri@ti.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * version 2 as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but | ||
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | * General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
18 | * 02110-1301 USA | ||
19 | * | ||
20 | */ | ||
21 | #include <linux/module.h> | ||
22 | #include <sound/soc.h> | ||
23 | |||
24 | #define DRV_NAME "hdmi-audio-codec" | ||
25 | |||
26 | static struct snd_soc_codec_driver omap_hdmi_codec; | ||
27 | |||
28 | static struct snd_soc_dai_driver omap_hdmi_codec_dai = { | ||
29 | .name = "omap-hdmi-hifi", | ||
30 | .playback = { | ||
31 | .channels_min = 2, | ||
32 | .channels_max = 8, | ||
33 | .rates = SNDRV_PCM_RATE_32000 | | ||
34 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | | ||
35 | SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | | ||
36 | SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000, | ||
37 | .formats = SNDRV_PCM_FMTBIT_S16_LE | | ||
38 | SNDRV_PCM_FMTBIT_S24_LE, | ||
39 | }, | ||
40 | }; | ||
41 | |||
42 | static __devinit int omap_hdmi_codec_probe(struct platform_device *pdev) | ||
43 | { | ||
44 | return snd_soc_register_codec(&pdev->dev, &omap_hdmi_codec, | ||
45 | &omap_hdmi_codec_dai, 1); | ||
46 | } | ||
47 | |||
48 | static __devexit int omap_hdmi_codec_remove(struct platform_device *pdev) | ||
49 | { | ||
50 | snd_soc_unregister_codec(&pdev->dev); | ||
51 | return 0; | ||
52 | } | ||
53 | |||
54 | static struct platform_driver omap_hdmi_codec_driver = { | ||
55 | .driver = { | ||
56 | .name = DRV_NAME, | ||
57 | .owner = THIS_MODULE, | ||
58 | }, | ||
59 | |||
60 | .probe = omap_hdmi_codec_probe, | ||
61 | .remove = __devexit_p(omap_hdmi_codec_remove), | ||
62 | }; | ||
63 | |||
64 | module_platform_driver(omap_hdmi_codec_driver); | ||
65 | |||
66 | MODULE_AUTHOR("Ricardo Neri <ricardo.neri@ti.com>"); | ||
67 | MODULE_DESCRIPTION("ASoC OMAP HDMI codec driver"); | ||
68 | MODULE_LICENSE("GPL"); | ||
69 | MODULE_ALIAS("platform:" DRV_NAME); | ||
diff --git a/sound/soc/omap/Kconfig b/sound/soc/omap/Kconfig index deafbfaacdbf..9ccfa5e1c11b 100644 --- a/sound/soc/omap/Kconfig +++ b/sound/soc/omap/Kconfig | |||
@@ -113,6 +113,7 @@ config SND_OMAP_SOC_OMAP4_HDMI | |||
113 | tristate "SoC Audio support for Texas Instruments OMAP4 HDMI" | 113 | tristate "SoC Audio support for Texas Instruments OMAP4 HDMI" |
114 | depends on SND_OMAP_SOC && OMAP4_DSS_HDMI && OMAP2_DSS && ARCH_OMAP4 | 114 | depends on SND_OMAP_SOC && OMAP4_DSS_HDMI && OMAP2_DSS && ARCH_OMAP4 |
115 | select SND_OMAP_SOC_HDMI | 115 | select SND_OMAP_SOC_HDMI |
116 | select SND_SOC_OMAP_HDMI_CODEC | ||
116 | help | 117 | help |
117 | Say Y if you want to add support for SoC HDMI audio on Texas Instruments | 118 | Say Y if you want to add support for SoC HDMI audio on Texas Instruments |
118 | OMAP4 chips | 119 | OMAP4 chips |