Commit a48f928e authored by Jack Yu's avatar Jack Yu Committed by Mark Brown

ASoC: rt715: modification for code simplicity

Modification for code simplicity.
Signed-off-by: default avatarJack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/340ee2df83ce47fcb1b59541b12ba7f4@realtek.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7ae6af41
...@@ -57,14 +57,14 @@ static void rt715_get_gain(struct rt715_priv *rt715, unsigned int addr_h, ...@@ -57,14 +57,14 @@ static void rt715_get_gain(struct rt715_priv *rt715, unsigned int addr_h,
{ {
int ret; int ret;
/* R Channel */ /* R Channel */
*r_val = (val_h << 8); *r_val = val_h << 8;
ret = regmap_read(rt715->regmap, addr_l, r_val); ret = regmap_read(rt715->regmap, addr_l, r_val);
if (ret < 0) if (ret < 0)
pr_err("Failed to get R channel gain.\n"); pr_err("Failed to get R channel gain.\n");
/* L Channel */ /* L Channel */
val_h |= 0x20; val_h |= 0x20;
*l_val = (val_h << 8); *l_val = val_h << 8;
ret = regmap_read(rt715->regmap, addr_h, l_val); ret = regmap_read(rt715->regmap, addr_h, l_val);
if (ret < 0) if (ret < 0)
pr_err("Failed to get L channel gain.\n"); pr_err("Failed to get L channel gain.\n");
...@@ -188,8 +188,8 @@ static int rt715_set_amp_gain_get(struct snd_kcontrol *kcontrol, ...@@ -188,8 +188,8 @@ static int rt715_set_amp_gain_get(struct snd_kcontrol *kcontrol,
if (mc->invert) { if (mc->invert) {
/* for mute status */ /* for mute status */
read_ll = !((read_ll & 0x80) >> RT715_MUTE_SFT); read_ll = !(read_ll & 0x80);
read_rl = !((read_rl & 0x80) >> RT715_MUTE_SFT); read_rl = !(read_rl & 0x80);
} else { } else {
/* for gain */ /* for gain */
read_ll = read_ll & 0x7f; read_ll = read_ll & 0x7f;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment