diff options
author | Tushar Behera <tushar.b@samsung.com> | 2014-07-04 04:52:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-04 15:31:45 -0400 |
commit | 00ad93e26375d974801886070738d0c7cf187fdf (patch) | |
tree | cbb949692ab0ff4799fff14651656fe53a6f2eef | |
parent | 46aed597527384b30a6d49bff1806f6b1ed1fd77 (diff) |
ASoC: samsung: Make card name for Snow configurable
Snow sound-card driver supports multiple boards with different
audio codecs. Updating the sound card name per board basis would provide
some more information to the end-user.
Signed-off-by: Tushar Behera <tushar.b@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | Documentation/devicetree/bindings/sound/snow.txt | 4 | ||||
-rw-r--r-- | sound/soc/samsung/snow.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/sound/snow.txt b/Documentation/devicetree/bindings/sound/snow.txt index e0b7a8207f5f..6df74f15687f 100644 --- a/Documentation/devicetree/bindings/sound/snow.txt +++ b/Documentation/devicetree/bindings/sound/snow.txt | |||
@@ -8,11 +8,15 @@ Required properties: | |||
8 | - samsung,i2s-controller: The phandle of the Samsung I2S controller | 8 | - samsung,i2s-controller: The phandle of the Samsung I2S controller |
9 | - samsung,audio-codec: The phandle of the audio codec | 9 | - samsung,audio-codec: The phandle of the audio codec |
10 | 10 | ||
11 | Optional: | ||
12 | - samsung,model: The name of the sound-card | ||
13 | |||
11 | Example: | 14 | Example: |
12 | 15 | ||
13 | sound { | 16 | sound { |
14 | compatible = "google,snow-audio-max98095"; | 17 | compatible = "google,snow-audio-max98095"; |
15 | 18 | ||
19 | samsung,model = "Snow-I2S-MAX98095"; | ||
16 | samsung,i2s-controller = <&i2s0>; | 20 | samsung,i2s-controller = <&i2s0>; |
17 | samsung,audio-codec = <&max98095>; | 21 | samsung,audio-codec = <&max98095>; |
18 | }; | 22 | }; |
diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c index 8bbd348358dd..0acf5d0eed53 100644 --- a/sound/soc/samsung/snow.c +++ b/sound/soc/samsung/snow.c | |||
@@ -92,6 +92,9 @@ static int snow_probe(struct platform_device *pdev) | |||
92 | 92 | ||
93 | card->dev = &pdev->dev; | 93 | card->dev = &pdev->dev; |
94 | 94 | ||
95 | /* Update card-name if provided through DT, else use default name */ | ||
96 | snd_soc_of_parse_card_name(card, "samsung,model"); | ||
97 | |||
95 | ret = devm_snd_soc_register_card(&pdev->dev, card); | 98 | ret = devm_snd_soc_register_card(&pdev->dev, card); |
96 | if (ret) { | 99 | if (ret) { |
97 | dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); | 100 | dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); |