Skip to contentSkip to conversation

ASoC: TWL4030 codec: Multiple DAC nameing

DISCUSSION Peter Ujfalusi 2 participants 2 messages Dec 2, 2008

lore
Share & tools
lore
#0 lore raw

Hello,

Now I have some working prototype for the TWL4030 codec DAPM playback routing. But before I send the patches I want to clear out something:
Since the TWL has four DACs and I want to map all of them, what would be the correct SND_SOC_DAPM_DAC naming for them?

At the moment I have these:

/* DACs */
SND_SOC_DAPM_DAC("DACR1", "Right Front Playback",

		TWL4030_REG_AVDAC_CTL, 0, 0),
SND_SOC_DAPM_DAC("DACL1", "Left Front Playback",
		TWL4030_REG_AVDAC_CTL, 1, 0),
SND_SOC_DAPM_DAC("DACR2", "Right Rear Playback",
		TWL4030_REG_AVDAC_CTL, 2, 0),
SND_SOC_DAPM_DAC("DACL2", "Left Rear Playback",
		TWL4030_REG_AVDAC_CTL, 3, 0),

Are these are OK, or should I just use "Right Playback" for both DACR1 and DACR2?

Btw: the 'dynamic' routing and switching now works (no user visible power control for the DACs and APGAs) in a way, that if the output is configured to take the audio from one of the DAC, than the corresponding chain (APGA, DAC) will be powered on only.

Thanks,
Péter

#1 lore raw
Quoted 10 lines · Peter Ujfalusi

/* DACs */
SND_SOC_DAPM_DAC("DACR1", "Right Front Playback",

		TWL4030_REG_AVDAC_CTL, 0, 0),
SND_SOC_DAPM_DAC("DACL1", "Left Front Playback",
		TWL4030_REG_AVDAC_CTL, 1, 0),
SND_SOC_DAPM_DAC("DACR2", "Right Rear Playback",
		TWL4030_REG_AVDAC_CTL, 2, 0),
SND_SOC_DAPM_DAC("DACL2", "Left Rear Playback",
		TWL4030_REG_AVDAC_CTL, 3, 0),
Quoted 2 lines

Are these are OK, or should I just use "Right Playback" for both DACR1 and DACR2?

Your current naming is good - if you use only "Right Playback" DAPM won't be able to distinguish the two audio streams from each other.