Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0f7f3d1

Browse files
Jyri Sarhabroonie
authored andcommitted
ASoC: hdmi-codec: Add devicetree binding with documentation
Signed-off-by: Jyri Sarha <[email protected]> cc: [email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent c600e95 commit 0f7f3d1

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Device-Tree bindings for dummy HDMI codec
2+
3+
Required properties:
4+
- compatible: should be "linux,hdmi-audio".
5+
6+
CODEC output pins:
7+
* TX
8+
9+
CODEC input pins:
10+
* RX
11+
12+
Example node:
13+
14+
hdmi_audio: hdmi_audio@0 {
15+
compatible = "linux,hdmi-audio";
16+
status = "okay";
17+
};

sound/soc/codecs/hdmi.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121
#include <linux/module.h>
2222
#include <sound/soc.h>
23+
#include <linux/of_device.h>
2324

2425
#define DRV_NAME "hdmi-audio-codec"
2526

@@ -60,6 +61,14 @@ static struct snd_soc_dai_driver hdmi_codec_dai = {
6061

6162
};
6263

64+
#ifdef CONFIG_OF
65+
static const struct of_device_id hdmi_audio_codec_ids[] = {
66+
{ .compatible = "linux,hdmi-audio", },
67+
{ }
68+
};
69+
MODULE_DEVICE_TABLE(of, hdmi_audio_codec_ids);
70+
#endif
71+
6372
static struct snd_soc_codec_driver hdmi_codec = {
6473
.dapm_widgets = hdmi_widgets,
6574
.num_dapm_widgets = ARRAY_SIZE(hdmi_widgets),
@@ -83,6 +92,7 @@ static struct platform_driver hdmi_codec_driver = {
8392
.driver = {
8493
.name = DRV_NAME,
8594
.owner = THIS_MODULE,
95+
.of_match_table = of_match_ptr(hdmi_audio_codec_ids),
8696
},
8797

8898
.probe = hdmi_codec_probe,

0 commit comments

Comments
 (0)