Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332121
b: refs/heads/master
c: 805238b
h: refs/heads/master
i:
  332119: c45ca68
v: v3
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Sep 22, 2012
1 parent 338055a commit e451dc8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7f51e7d30e36ac987d7a0e480d890477c5f8b04f
refs/heads/master: 805238b1b76c8f4f17a92f50c12664a8e6f3564f
43 changes: 29 additions & 14 deletions trunk/sound/soc/codecs/twl6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,10 +727,8 @@ static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = {
TWL6040_REG_MICRCTL, 1, 0, NULL, 0),

/* ADCs */
SND_SOC_DAPM_ADC("ADC Left", "Left Front Capture",
TWL6040_REG_MICLCTL, 2, 0),
SND_SOC_DAPM_ADC("ADC Right", "Right Front Capture",
TWL6040_REG_MICRCTL, 2, 0),
SND_SOC_DAPM_ADC("ADC Left", NULL, TWL6040_REG_MICLCTL, 2, 0),
SND_SOC_DAPM_ADC("ADC Right", NULL, TWL6040_REG_MICRCTL, 2, 0),

/* Microphone bias */
SND_SOC_DAPM_SUPPLY("Headset Mic Bias",
Expand All @@ -743,15 +741,12 @@ static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = {
TWL6040_REG_DMICBCTL, 4, 0, NULL, 0),

/* DACs */
SND_SOC_DAPM_DAC("HSDAC Left", "Headset Playback", SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_DAC("HSDAC Right", "Headset Playback", SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_DAC("HFDAC Left", "Handsfree Playback",
TWL6040_REG_HFLCTL, 0, 0),
SND_SOC_DAPM_DAC("HFDAC Right", "Handsfree Playback",
TWL6040_REG_HFRCTL, 0, 0),
SND_SOC_DAPM_DAC("HSDAC Left", NULL, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_DAC("HSDAC Right", NULL, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_DAC("HFDAC Left", NULL, TWL6040_REG_HFLCTL, 0, 0),
SND_SOC_DAPM_DAC("HFDAC Right", NULL, TWL6040_REG_HFRCTL, 0, 0),
/* Virtual DAC for vibra path (DL4 channel) */
SND_SOC_DAPM_DAC("VIBRA DAC", "Vibra Playback",
SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_DAC("VIBRA DAC", NULL, SND_SOC_NOPM, 0, 0),

SND_SOC_DAPM_MUX("Handsfree Left Playback",
SND_SOC_NOPM, 0, 0, &hfl_mux_controls),
Expand Down Expand Up @@ -810,6 +805,26 @@ static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = {
};

static const struct snd_soc_dapm_route intercon[] = {
/* Stream -> DAC mapping */
{"HSDAC Left", NULL, "Legacy Playback"},
{"HSDAC Left", NULL, "Headset Playback"},
{"HSDAC Right", NULL, "Legacy Playback"},
{"HSDAC Right", NULL, "Headset Playback"},

{"HFDAC Left", NULL, "Legacy Playback"},
{"HFDAC Left", NULL, "Handsfree Playback"},
{"HFDAC Right", NULL, "Legacy Playback"},
{"HFDAC Right", NULL, "Handsfree Playback"},

{"VIBRA DAC", NULL, "Legacy Playback"},
{"VIBRA DAC", NULL, "Vibra Playback"},

/* ADC -> Stream mapping */
{"ADC Left", NULL, "Legacy Capture"},
{"ADC Left", NULL, "Capture"},
{"ADC Right", NULL, "Legacy Capture"},
{"ADC Right", NULL, "Capture"},

/* Capture path */
{"Analog Left Capture Route", "Headset Mic", "HSMIC"},
{"Analog Left Capture Route", "Main Mic", "MAINMIC"},
Expand Down Expand Up @@ -1028,14 +1043,14 @@ static struct snd_soc_dai_driver twl6040_dai[] = {
{
.name = "twl6040-legacy",
.playback = {
.stream_name = "Playback",
.stream_name = "Legacy Playback",
.channels_min = 1,
.channels_max = 5,
.rates = TWL6040_RATES,
.formats = TWL6040_FORMATS,
},
.capture = {
.stream_name = "Capture",
.stream_name = "Legacy Capture",
.channels_min = 1,
.channels_max = 2,
.rates = TWL6040_RATES,
Expand Down

0 comments on commit e451dc8

Please sign in to comment.