diff options
| -rw-r--r-- | Documentation/devicetree/bindings/sound/armada-370db-audio.txt | 9 | ||||
| -rw-r--r-- | sound/soc/kirkwood/Kconfig | 1 | ||||
| -rw-r--r-- | sound/soc/kirkwood/armada-370-db.c | 28 |
3 files changed, 35 insertions, 3 deletions
diff --git a/Documentation/devicetree/bindings/sound/armada-370db-audio.txt b/Documentation/devicetree/bindings/sound/armada-370db-audio.txt index 3893b4d15a20..bf984d238620 100644 --- a/Documentation/devicetree/bindings/sound/armada-370db-audio.txt +++ b/Documentation/devicetree/bindings/sound/armada-370db-audio.txt | |||
| @@ -11,14 +11,17 @@ Mandatory properties: | |||
| 11 | * marvell,audio-controller: a phandle that points to the audio | 11 | * marvell,audio-controller: a phandle that points to the audio |
| 12 | controller of the Armada 370 SoC. | 12 | controller of the Armada 370 SoC. |
| 13 | 13 | ||
| 14 | * marvell,audio-codec: a phandle that points to the analog audio | 14 | * marvell,audio-codec: a set of three phandles that points to: |
| 15 | codec connected to the Armada 370 SoC. | 15 | |
| 16 | 1/ the analog audio codec connected to the Armada 370 SoC | ||
| 17 | 2/ the S/PDIF transceiver | ||
| 18 | 3/ the S/PDIF receiver | ||
| 16 | 19 | ||
| 17 | Example: | 20 | Example: |
| 18 | 21 | ||
| 19 | sound { | 22 | sound { |
| 20 | compatible = "marvell,a370db-audio"; | 23 | compatible = "marvell,a370db-audio"; |
| 21 | marvell,audio-controller = <&audio_controller>; | 24 | marvell,audio-controller = <&audio_controller>; |
| 22 | marvell,audio-codec = <&audio_codec>; | 25 | marvell,audio-codec = <&audio_codec &spdif_out &spdif_in>; |
| 23 | status = "okay"; | 26 | status = "okay"; |
| 24 | }; | 27 | }; |
diff --git a/sound/soc/kirkwood/Kconfig b/sound/soc/kirkwood/Kconfig index 2dc3ecf34801..49f8437665de 100644 --- a/sound/soc/kirkwood/Kconfig +++ b/sound/soc/kirkwood/Kconfig | |||
| @@ -10,6 +10,7 @@ config SND_KIRKWOOD_SOC_ARMADA370_DB | |||
| 10 | tristate "SoC Audio support for Armada 370 DB" | 10 | tristate "SoC Audio support for Armada 370 DB" |
| 11 | depends on SND_KIRKWOOD_SOC && (ARCH_MVEBU || COMPILE_TEST) && I2C | 11 | depends on SND_KIRKWOOD_SOC && (ARCH_MVEBU || COMPILE_TEST) && I2C |
| 12 | select SND_SOC_CS42L51 | 12 | select SND_SOC_CS42L51 |
| 13 | select SND_SOC_SPDIF | ||
| 13 | help | 14 | help |
| 14 | Say Y if you want to add support for SoC audio on | 15 | Say Y if you want to add support for SoC audio on |
| 15 | the Armada 370 Development Board. | 16 | the Armada 370 Development Board. |
diff --git a/sound/soc/kirkwood/armada-370-db.c b/sound/soc/kirkwood/armada-370-db.c index 977639b3ffde..c44333849259 100644 --- a/sound/soc/kirkwood/armada-370-db.c +++ b/sound/soc/kirkwood/armada-370-db.c | |||
| @@ -67,6 +67,20 @@ static struct snd_soc_dai_link a370db_dai[] = { | |||
| 67 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS, | 67 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS, |
| 68 | .ops = &a370db_ops, | 68 | .ops = &a370db_ops, |
| 69 | }, | 69 | }, |
| 70 | { | ||
| 71 | .name = "S/PDIF out", | ||
| 72 | .stream_name = "spdif-out", | ||
| 73 | .cpu_dai_name = "spdif", | ||
| 74 | .codec_dai_name = "dit-hifi", | ||
| 75 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS, | ||
| 76 | }, | ||
| 77 | { | ||
| 78 | .name = "S/PDIF in", | ||
| 79 | .stream_name = "spdif-in", | ||
| 80 | .cpu_dai_name = "spdif", | ||
| 81 | .codec_dai_name = "dir-hifi", | ||
| 82 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS, | ||
| 83 | }, | ||
| 70 | }; | 84 | }; |
| 71 | 85 | ||
| 72 | static struct snd_soc_card a370db = { | 86 | static struct snd_soc_card a370db = { |
| @@ -95,6 +109,20 @@ static int a370db_probe(struct platform_device *pdev) | |||
| 95 | of_parse_phandle(pdev->dev.of_node, | 109 | of_parse_phandle(pdev->dev.of_node, |
| 96 | "marvell,audio-codec", 0); | 110 | "marvell,audio-codec", 0); |
| 97 | 111 | ||
| 112 | a370db_dai[1].cpu_of_node = a370db_dai[0].cpu_of_node; | ||
| 113 | a370db_dai[1].platform_of_node = a370db_dai[0].cpu_of_node; | ||
| 114 | |||
| 115 | a370db_dai[1].codec_of_node = | ||
| 116 | of_parse_phandle(pdev->dev.of_node, | ||
| 117 | "marvell,audio-codec", 1); | ||
| 118 | |||
| 119 | a370db_dai[2].cpu_of_node = a370db_dai[0].cpu_of_node; | ||
| 120 | a370db_dai[2].platform_of_node = a370db_dai[0].cpu_of_node; | ||
| 121 | |||
| 122 | a370db_dai[2].codec_of_node = | ||
| 123 | of_parse_phandle(pdev->dev.of_node, | ||
| 124 | "marvell,audio-codec", 2); | ||
| 125 | |||
| 98 | return devm_snd_soc_register_card(card->dev, card); | 126 | return devm_snd_soc_register_card(card->dev, card); |
| 99 | } | 127 | } |
| 100 | 128 | ||
