diff options
Diffstat (limited to 'drivers/media/radio/radio-si476x.c')
-rw-r--r-- | drivers/media/radio/radio-si476x.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/drivers/media/radio/radio-si476x.c b/drivers/media/radio/radio-si476x.c index 271f725b17e8..1ed7a15dd360 100644 --- a/drivers/media/radio/radio-si476x.c +++ b/drivers/media/radio/radio-si476x.c @@ -775,7 +775,8 @@ static int si476x_radio_s_hw_freq_seek(struct file *file, void *priv, rangelow = si476x_to_v4l2(radio->core, rangelow); else goto unlock; - } + } else + rangelow = seek->rangelow; if (!seek->rangehigh) { err = regmap_read(radio->core->regmap, SI476X_PROP_SEEK_BAND_TOP, @@ -784,7 +785,8 @@ static int si476x_radio_s_hw_freq_seek(struct file *file, void *priv, rangehigh = si476x_to_v4l2(radio->core, rangehigh); else goto unlock; - } + } else + rangehigh = seek->rangehigh; if (rangelow > rangehigh) { err = -EINVAL; @@ -1008,6 +1010,14 @@ static int si476x_radio_s_ctrl(struct v4l2_ctrl *ctrl) } break; + case V4L2_CID_AUDIO_MUTE: + if (ctrl->val) + retval = regmap_write(radio->core->regmap, + SI476X_PROP_AUDIO_MUTE, 3); + else + retval = regmap_write(radio->core->regmap, + SI476X_PROP_AUDIO_MUTE, 0); + break; default: retval = -EINVAL; break; @@ -1527,6 +1537,16 @@ static int si476x_radio_probe(struct platform_device *pdev) goto exit; } + ctrl = v4l2_ctrl_new_std(&radio->ctrl_handler, &si476x_ctrl_ops, + V4L2_CID_AUDIO_MUTE, + 0, 1, 1, 0); + rval = radio->ctrl_handler.error; + if (ctrl == NULL && rval) { + dev_err(&pdev->dev, "Could not initialize V4L2_CID_AUDIO_MUTE control %d\n", + rval); + goto exit; + } + if (si476x_core_has_diversity(radio->core)) { si476x_ctrls[SI476X_IDX_DIVERSITY_MODE].def = si476x_phase_diversity_mode_to_idx(radio->core->diversity_mode); |