/* si470x_vidioc_g_ctrl - get the value of a control  */
static int si470x_vidioc_g_ctrl(struct file *file, void *priv, struct v4l2_control *ctrl)
/* si470x_vidioc_g_ctrl - get the value of a control  */
static int si470x_vidioc_g_ctrl(struct file *file, void *priv, struct v4l2_control *ctrl)
{
	struct si470x_device *radio = video_drvdata(file);
	int retval = 0;
	retval = si470x_disconnect_check(radio);
	if (retval)
		goto done;
	switch (ctrl->id) {
	case V4L2_CID_AUDIO_VOLUME:
		ctrl->value = radio->registers[SYSCONFIG2] &
				SYSCONFIG2_VOLUME;
		break;
	case V4L2_CID_AUDIO_MUTE:
		ctrl->value = ((radio->registers[POWERCFG] &
				POWERCFG_DMUTE) == 0) ? 1 : 0;
		break;
	default:
		retval = -EINVAL;
	}
done:
	if (retval < 0)
		dev_warn(&radio->videodev->dev,
			"get control failed with %d\n", retval);
	return retval;
}