Skip to content

Commit bf7c6e6

Browse files
21cnbaobroonie
authored andcommitted
ASoC: omap-hdmi-codec: make the driver common for other SoCs
to support HDMI on CSR SiRFprimaII and atlasVI, we need one more HDMI pseudo codec, rather than add a new driver, we can make omap HDMI codec common for other SoCs as well. then the omap-hdmi codec becomes a generic HDMI pseudo- codec as HDMI audio features depend on HDMI specification not on SoCs. Signed-off-by: Barry Song <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent d683b96 commit bf7c6e6

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

sound/soc/codecs/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ config SND_SOC_ALL_CODECS
5353
select SND_SOC_MAX9877 if I2C
5454
select SND_SOC_MC13783 if MFD_MC13XXX
5555
select SND_SOC_ML26124 if I2C
56-
select SND_SOC_OMAP_HDMI_CODEC if OMAP4_DSS_HDMI
56+
select SND_SOC_HDMI_CODEC
5757
select SND_SOC_PCM3008
5858
select SND_SOC_RT5631 if I2C
5959
select SND_SOC_SGTL5000 if I2C
@@ -287,7 +287,7 @@ config SND_SOC_MAX98095
287287
config SND_SOC_MAX9850
288288
tristate
289289

290-
config SND_SOC_OMAP_HDMI_CODEC
290+
config SND_SOC_HDMI_CODEC
291291
tristate
292292

293293
config SND_SOC_PCM3008

sound/soc/codecs/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ snd-soc-max98095-objs := max98095.o
4141
snd-soc-max9850-objs := max9850.o
4242
snd-soc-mc13783-objs := mc13783.o
4343
snd-soc-ml26124-objs := ml26124.o
44-
snd-soc-omap-hdmi-codec-objs := omap-hdmi.o
44+
snd-soc-hdmi-codec-objs := hdmi.o
4545
snd-soc-pcm3008-objs := pcm3008.o
4646
snd-soc-rt5631-objs := rt5631.o
4747
snd-soc-sgtl5000-objs := sgtl5000.o
@@ -168,7 +168,7 @@ obj-$(CONFIG_SND_SOC_MAX98095) += snd-soc-max98095.o
168168
obj-$(CONFIG_SND_SOC_MAX9850) += snd-soc-max9850.o
169169
obj-$(CONFIG_SND_SOC_MC13783) += snd-soc-mc13783.o
170170
obj-$(CONFIG_SND_SOC_ML26124) += snd-soc-ml26124.o
171-
obj-$(CONFIG_SND_SOC_OMAP_HDMI_CODEC) += snd-soc-omap-hdmi-codec.o
171+
obj-$(CONFIG_SND_SOC_HDMI_CODEC) += snd-soc-hdmi-codec.o
172172
obj-$(CONFIG_SND_SOC_PCM3008) += snd-soc-pcm3008.o
173173
obj-$(CONFIG_SND_SOC_RT5631) += snd-soc-rt5631.o
174174
obj-$(CONFIG_SND_SOC_SGTL5000) += snd-soc-sgtl5000.o

sound/soc/codecs/omap-hdmi.c renamed to sound/soc/codecs/hdmi.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* ALSA SoC codec driver for HDMI audio on OMAP processors.
2+
* ALSA SoC codec driver for HDMI audio codecs.
33
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
44
* Author: Ricardo Neri <[email protected]>
55
*
@@ -23,10 +23,10 @@
2323

2424
#define DRV_NAME "hdmi-audio-codec"
2525

26-
static struct snd_soc_codec_driver omap_hdmi_codec;
26+
static struct snd_soc_codec_driver hdmi_codec;
2727

28-
static struct snd_soc_dai_driver omap_hdmi_codec_dai = {
29-
.name = "omap-hdmi-hifi",
28+
static struct snd_soc_dai_driver hdmi_codec_dai = {
29+
.name = "hdmi-hifi",
3030
.playback = {
3131
.channels_min = 2,
3232
.channels_max = 8,
@@ -39,31 +39,31 @@ static struct snd_soc_dai_driver omap_hdmi_codec_dai = {
3939
},
4040
};
4141

42-
static int omap_hdmi_codec_probe(struct platform_device *pdev)
42+
static int hdmi_codec_probe(struct platform_device *pdev)
4343
{
44-
return snd_soc_register_codec(&pdev->dev, &omap_hdmi_codec,
45-
&omap_hdmi_codec_dai, 1);
44+
return snd_soc_register_codec(&pdev->dev, &hdmi_codec,
45+
&hdmi_codec_dai, 1);
4646
}
4747

48-
static int omap_hdmi_codec_remove(struct platform_device *pdev)
48+
static int hdmi_codec_remove(struct platform_device *pdev)
4949
{
5050
snd_soc_unregister_codec(&pdev->dev);
5151
return 0;
5252
}
5353

54-
static struct platform_driver omap_hdmi_codec_driver = {
54+
static struct platform_driver hdmi_codec_driver = {
5555
.driver = {
5656
.name = DRV_NAME,
5757
.owner = THIS_MODULE,
5858
},
5959

60-
.probe = omap_hdmi_codec_probe,
61-
.remove = omap_hdmi_codec_remove,
60+
.probe = hdmi_codec_probe,
61+
.remove = hdmi_codec_remove,
6262
};
6363

64-
module_platform_driver(omap_hdmi_codec_driver);
64+
module_platform_driver(hdmi_codec_driver);
6565

6666
MODULE_AUTHOR("Ricardo Neri <[email protected]>");
67-
MODULE_DESCRIPTION("ASoC OMAP HDMI codec driver");
67+
MODULE_DESCRIPTION("ASoC generic HDMI codec driver");
6868
MODULE_LICENSE("GPL");
6969
MODULE_ALIAS("platform:" DRV_NAME);

sound/soc/omap/omap-hdmi-card.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static struct snd_soc_dai_link omap_hdmi_dai = {
3535
.cpu_dai_name = "omap-hdmi-audio-dai",
3636
.platform_name = "omap-pcm-audio",
3737
.codec_name = "hdmi-audio-codec",
38-
.codec_dai_name = "omap-hdmi-hifi",
38+
.codec_dai_name = "hdmi-hifi",
3939
};
4040

4141
static struct snd_soc_card snd_soc_omap_hdmi = {

0 commit comments

Comments
 (0)