ASoC: samsung: Make card name for Snow configurable
authorTushar Behera <tushar.b@samsung.com>
Fri, 4 Jul 2014 08:52:59 +0000 (14:22 +0530)
committerMark Brown <broonie@linaro.org>
Fri, 4 Jul 2014 19:31:45 +0000 (20:31 +0100)
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>
Documentation/devicetree/bindings/sound/snow.txt
sound/soc/samsung/snow.c

index e0b7a8207f5f6bccf298ef0af7ecde9e9922ec70..6df74f15687f9839cd2015eae1d6a091d15433b5 100644 (file)
@@ -8,11 +8,15 @@ Required properties:
 - samsung,i2s-controller: The phandle of the Samsung I2S controller
 - samsung,audio-codec: The phandle of the audio codec
 
+Optional:
+- samsung,model: The name of the sound-card
+
 Example:
 
 sound {
                compatible = "google,snow-audio-max98095";
 
+               samsung,model = "Snow-I2S-MAX98095";
                samsung,i2s-controller = <&i2s0>;
                samsung,audio-codec = <&max98095>;
 };
index 8bbd348358ddbab20acd4c27ebd5d7999061fea0..0acf5d0eed53a30979f66d466252b51f660f3d2e 100644 (file)
@@ -92,6 +92,9 @@ static int snow_probe(struct platform_device *pdev)
 
        card->dev = &pdev->dev;
 
+       /* Update card-name if provided through DT, else use default name */
+       snd_soc_of_parse_card_name(card, "samsung,model");
+
        ret = devm_snd_soc_register_card(&pdev->dev, card);
        if (ret) {
                dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
This page took 0.025682 seconds and 5 git commands to generate.