mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
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>
This commit is contained in:
parent
46aed59752
commit
00ad93e263
2 changed files with 7 additions and 0 deletions
|
@ -8,11 +8,15 @@ Required properties:
|
||||||
- samsung,i2s-controller: The phandle of the Samsung I2S controller
|
- samsung,i2s-controller: The phandle of the Samsung I2S controller
|
||||||
- samsung,audio-codec: The phandle of the audio codec
|
- samsung,audio-codec: The phandle of the audio codec
|
||||||
|
|
||||||
|
Optional:
|
||||||
|
- samsung,model: The name of the sound-card
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
sound {
|
sound {
|
||||||
compatible = "google,snow-audio-max98095";
|
compatible = "google,snow-audio-max98095";
|
||||||
|
|
||||||
|
samsung,model = "Snow-I2S-MAX98095";
|
||||||
samsung,i2s-controller = <&i2s0>;
|
samsung,i2s-controller = <&i2s0>;
|
||||||
samsung,audio-codec = <&max98095>;
|
samsung,audio-codec = <&max98095>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -92,6 +92,9 @@ static int snow_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
card->dev = &pdev->dev;
|
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);
|
ret = devm_snd_soc_register_card(&pdev->dev, card);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
|
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
|
||||||
|
|
Loading…
Add table
Reference in a new issue