Skip to content

Commit af4b654

Browse files
shcgitbroonie
authored andcommitted
ASoC: wm8753: Add control to allow swapping HiFi DAC channels
This patch adds a control to allow swapping HiFi DAC Left/Right channels. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent a5de5b7 commit af4b654

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sound/soc/codecs/wm8753.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ static const DECLARE_TLV_DB_SCALE(voice_mix_tlv, -1200, 300, 0);
280280
static const DECLARE_TLV_DB_SCALE(pga_tlv, -1725, 75, 0);
281281

282282
static const struct snd_kcontrol_new wm8753_snd_controls[] = {
283+
SOC_SINGLE("Hi-Fi DAC Left/Right channel Swap", WM8753_HIFI, 5, 1, 0),
283284
SOC_DOUBLE_R_TLV("PCM Volume", WM8753_LDAC, WM8753_RDAC, 0, 255, 0, dac_tlv),
284285

285286
SOC_DOUBLE_R_TLV("ADC Capture Volume", WM8753_LADC, WM8753_RADC, 0, 255, 0,
@@ -1087,7 +1088,7 @@ static int wm8753_i2s_set_dai_fmt(struct snd_soc_codec *codec,
10871088
{
10881089
u16 ioctl, hifi;
10891090

1090-
hifi = snd_soc_read(codec, WM8753_HIFI) & 0x011f;
1091+
hifi = snd_soc_read(codec, WM8753_HIFI) & 0x013f;
10911092
ioctl = snd_soc_read(codec, WM8753_IOCTL) & 0x00ae;
10921093

10931094
/* set master/slave audio interface */

0 commit comments

Comments
 (0)