Commit 598728e9 authored by Frank Schaefer's avatar Frank Schaefer Committed by Mauro Carvalho Chehab

[media] bttv: audio_mux(): do not change the value of the v4l2 mute control

There are cases where we want to call audio_mux() without changing the value of
the v4l2 mute control, for example
- mute mute on last close
- mute on device probing
Signed-off-by: default avatarFrank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 28cafc38
...@@ -999,7 +999,6 @@ audio_mux(struct bttv *btv, int input, int mute) ...@@ -999,7 +999,6 @@ audio_mux(struct bttv *btv, int input, int mute)
bttv_tvcards[btv->c.type].gpiomask); bttv_tvcards[btv->c.type].gpiomask);
signal = btread(BT848_DSTATUS) & BT848_DSTATUS_HLOC; signal = btread(BT848_DSTATUS) & BT848_DSTATUS_HLOC;
btv->mute = mute;
btv->audio = input; btv->audio = input;
/* automute */ /* automute */
...@@ -1031,7 +1030,7 @@ audio_mux(struct bttv *btv, int input, int mute) ...@@ -1031,7 +1030,7 @@ audio_mux(struct bttv *btv, int input, int mute)
ctrl = v4l2_ctrl_find(btv->sd_msp34xx->ctrl_handler, V4L2_CID_AUDIO_MUTE); ctrl = v4l2_ctrl_find(btv->sd_msp34xx->ctrl_handler, V4L2_CID_AUDIO_MUTE);
if (ctrl) if (ctrl)
v4l2_ctrl_s_ctrl(ctrl, btv->mute); v4l2_ctrl_s_ctrl(ctrl, mute);
/* Note: the inputs tuner/radio/extern/intern are translated /* Note: the inputs tuner/radio/extern/intern are translated
to msp routings. This assumes common behavior for all msp3400 to msp routings. This assumes common behavior for all msp3400
...@@ -1080,7 +1079,7 @@ audio_mux(struct bttv *btv, int input, int mute) ...@@ -1080,7 +1079,7 @@ audio_mux(struct bttv *btv, int input, int mute)
ctrl = v4l2_ctrl_find(btv->sd_tvaudio->ctrl_handler, V4L2_CID_AUDIO_MUTE); ctrl = v4l2_ctrl_find(btv->sd_tvaudio->ctrl_handler, V4L2_CID_AUDIO_MUTE);
if (ctrl) if (ctrl)
v4l2_ctrl_s_ctrl(ctrl, btv->mute); v4l2_ctrl_s_ctrl(ctrl, mute);
v4l2_subdev_call(btv->sd_tvaudio, audio, s_routing, v4l2_subdev_call(btv->sd_tvaudio, audio, s_routing,
input, 0, 0); input, 0, 0);
} }
...@@ -1088,7 +1087,7 @@ audio_mux(struct bttv *btv, int input, int mute) ...@@ -1088,7 +1087,7 @@ audio_mux(struct bttv *btv, int input, int mute)
ctrl = v4l2_ctrl_find(btv->sd_tda7432->ctrl_handler, V4L2_CID_AUDIO_MUTE); ctrl = v4l2_ctrl_find(btv->sd_tda7432->ctrl_handler, V4L2_CID_AUDIO_MUTE);
if (ctrl) if (ctrl)
v4l2_ctrl_s_ctrl(ctrl, btv->mute); v4l2_ctrl_s_ctrl(ctrl, mute);
} }
return 0; return 0;
} }
...@@ -1300,6 +1299,7 @@ static int bttv_s_ctrl(struct v4l2_ctrl *c) ...@@ -1300,6 +1299,7 @@ static int bttv_s_ctrl(struct v4l2_ctrl *c)
break; break;
case V4L2_CID_AUDIO_MUTE: case V4L2_CID_AUDIO_MUTE:
audio_mute(btv, c->val); audio_mute(btv, c->val);
btv->mute = c->val;
break; break;
case V4L2_CID_AUDIO_VOLUME: case V4L2_CID_AUDIO_VOLUME:
btv->volume_gpio(btv, c->val); btv->volume_gpio(btv, c->val);
......
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