Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305569
b: refs/heads/master
c: 172b4c5
h: refs/heads/master
i:
  305567: ed1fa0e
v: v3
  • Loading branch information
Shawn Guo authored and Mark Brown committed Apr 1, 2012
1 parent d86b1ca commit 9605136
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa0e25caafb7950e839db930649a65e8b7f70e1a
refs/heads/master: 172b4c5c8afdb7471d9b03fc96a6b6455a49e19d
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,27 @@ Required properties:
- model : The user-visible name of this sound complex
- ssi-controller : The phandle of the i.MX SSI controller
- audio-codec : The phandle of the SGTL5000 audio codec
- audio-routing : A list of the connections between audio components.
Each entry is a pair of strings, the first being the connection's sink,
the second being the connection's source. Valid names could be power
supplies, SGTL5000 pins, and the jacks on the board:

Power supplies:
* Mic Bias

SGTL5000 pins:
* MIC_IN
* LINE_IN
* HP_OUT
* LINE_OUT

Board connectors:
* Mic Jack
* Line In Jack
* Headphone Jack
* Line Out Jack
* Ext Spk

- mux-int-port : The internal port of the i.MX audio muxer (AUDMUX)
- mux-ext-port : The external port of the i.MX audio muxer

Expand All @@ -19,6 +40,10 @@ sound {
model = "imx51-babbage-sgtl5000";
ssi-controller = <&ssi1>;
audio-codec = <&sgtl5000>;
audio-routing =
"Mic Jack", "Mic Bias",
"MIC_IN", "Mic Bias",
"Headphone Jack", "HP_OUT";
mux-int-port = <1>;
mux-ext-port = <3>;
};
13 changes: 13 additions & 0 deletions trunk/sound/soc/fsl/imx-sgtl5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ static int imx_sgtl5000_dai_init(struct snd_soc_pcm_runtime *rtd)
return 0;
}

static const struct snd_soc_dapm_widget imx_sgtl5000_dapm_widgets[] = {
SND_SOC_DAPM_MIC("Mic Jack", NULL),
SND_SOC_DAPM_LINE("Line In Jack", NULL),
SND_SOC_DAPM_HP("Headphone Jack", NULL),
SND_SOC_DAPM_SPK("Line Out Jack", NULL),
SND_SOC_DAPM_SPK("Ext Spk", NULL),
};

static int __devinit imx_sgtl5000_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
Expand Down Expand Up @@ -127,10 +135,15 @@ static int __devinit imx_sgtl5000_probe(struct platform_device *pdev)

data->card.dev = &pdev->dev;
ret = snd_soc_of_parse_card_name(&data->card, "model");
if (ret)
return ret;
ret = snd_soc_of_parse_audio_routing(&data->card, "audio-routing");
if (ret)
return ret;
data->card.num_links = 1;
data->card.dai_link = &data->dai;
data->card.dapm_widgets = imx_sgtl5000_dapm_widgets;
data->card.num_dapm_widgets = ARRAY_SIZE(imx_sgtl5000_dapm_widgets);

ret = snd_soc_register_card(&data->card);
if (ret) {
Expand Down

0 comments on commit 9605136

Please sign in to comment.