[bttv] bttv driver does not report its "mute" status...
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Hi, There is an issue in the current Linux bttv driver, which makes impossible to obtain the current status of "mute" (ie. whether it is on or off) and perhaps some other parameters. When an application (say, v4lctl utility from Xawtv package) want to obtain the current status of "mute", it performs the ioctl(2) syscall, in a code similar to: > struct v4l2_control c; > > c.id = V4L2_CID_AUDIO_MUTE; > > rc = ioctl (fd, VIDIOC_G_CTRL, &c); > > if (rc < 0) return -1; > > return c.value; The correspond kernel fragment is in drivers/media/video/bt8xx/bttv-driver.c:bttv_g_ctrl() : > case V4L2_CID_AUDIO_MUTE: > case V4L2_CID_AUDIO_VOLUME: > case V4L2_CID_AUDIO_BALANCE: > case V4L2_CID_AUDIO_BASS: > case V4L2_CID_AUDIO_TREBLE: > bttv_call_i2c_clients(btv, VIDIOC_G_CTRL, c); > break; ie. the driver itself does nothing, just calling bttv_call_i2c_clients(), whereas in the similar bttv_s_ctrl() fragment (when setting)... > case V4L2_CID_AUDIO_MUTE: > audio_mute(btv, c->value); > /* fall through */ > case V4L2_CID_AUDIO_VOLUME: > if (btv->volume_gpio) > btv->volume_gpio(btv, c->value); > > bttv_call_i2c_clients(btv, VIDIOC_S_CTRL, c); > break; ...there is some action performed by the driver itself (call audio_mute(), set "btv->mute" etc.) My v4l device is "AVerMedia TVPhone 98", with lspci: > 03:05.0 Multimedia video controller: Brooktree Corporation Bt878 Video > Capture (rev 11) > 03:05.1 Multimedia controller: Brooktree Corporation Bt878 Audio > Capture (rev 11) and it seems that nothing is touched by bttv_call_i2c_clients() in my case. Then the driver returns success for the ioctl(VIDIOC_G_CTR) call, but "c.value" remains unchanged! As a result, "v4lctl show mute" does not reflect the true state. It always shows either "mute: on" or "mute: off" (depending how "c.value" was pre-inited). It seems that the mute state is actually saved in the driver ("btv->mute" ?), hence it could be fine if this issue will be resolved. I can perform any tests, debug etc. when needed. Regards, Dmitry Butskoy http://www.fedoraproject.org/wiki/DmitryButskoy _______________________________________________ v4l-dvb-maintainer mailing list v4l-dvb-maintainer@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/v4l-dvb-maintainer