Skip to content

Commit de050ac

Browse files
committed
ASoC: wm_hubs: Make sure we don't disable differential line outputs
While we need to clean up unused single ended line outputs we don't want to do this if the outputs are in differential mode. Signed-off-by: Mark Brown <[email protected]>
1 parent 1a38336 commit de050ac

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

sound/soc/codecs/wm_hubs.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
10351035
enum snd_soc_bias_level level)
10361036
{
10371037
struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec);
1038-
int val;
1038+
int mask, val;
10391039

10401040
switch (level) {
10411041
case SND_SOC_BIAS_STANDBY:
@@ -1047,6 +1047,13 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
10471047
case SND_SOC_BIAS_ON:
10481048
/* Turn off any unneded single ended outputs */
10491049
val = 0;
1050+
mask = 0;
1051+
1052+
if (hubs->lineout1_se)
1053+
mask |= WM8993_LINEOUT1N_ENA | WM8993_LINEOUT1P_ENA;
1054+
1055+
if (hubs->lineout2_se)
1056+
mask |= WM8993_LINEOUT2N_ENA | WM8993_LINEOUT2P_ENA;
10501057

10511058
if (hubs->lineout1_se && hubs->lineout1n_ena)
10521059
val |= WM8993_LINEOUT1N_ENA;
@@ -1061,11 +1068,7 @@ void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
10611068
val |= WM8993_LINEOUT2P_ENA;
10621069

10631070
snd_soc_update_bits(codec, WM8993_POWER_MANAGEMENT_3,
1064-
WM8993_LINEOUT1N_ENA |
1065-
WM8993_LINEOUT1P_ENA |
1066-
WM8993_LINEOUT2N_ENA |
1067-
WM8993_LINEOUT2P_ENA,
1068-
val);
1071+
mask, val);
10691072

10701073
/* Remove the input clamps */
10711074
snd_soc_update_bits(codec, WM8993_INPUTS_CLAMP_REG,

0 commit comments

Comments
 (0)