Date:2011-10-04 12:14:51 (8 years 11 months ago)
Author:Maarten ter Huurne
Commit:cc18a5b3a5ffbd720fb2dbd4f5d2c469bbfae417
Message:media: radio: RDA5807: Re-tune on enable.

Tuning is lost when the chip is disabled.
Files: drivers/media/radio/radio-rda5807.c (1 diff)

Change Details

drivers/media/radio/radio-rda5807.c
168168static int rda5807_set_enable(struct rda5807_driver *radio, int enabled)
169169{
170170    u16 val = enabled ? RDA5807_MASK_CTRL_ENABLE : 0;
171    int err;
171172    dev_info(&radio->i2c_client->dev, "set enabled to %d\n", enabled);
172    return rda5807_update_reg(radio, RDA5807_REG_CTRL,
173                  RDA5807_MASK_CTRL_ENABLE, val);
173    err = rda5807_update_reg(radio, RDA5807_REG_CTRL,
174                 RDA5807_MASK_CTRL_ENABLE, val);
175    if (err < 0)
176        return err;
177    /* Tuning is lost when the chip is disabled, so re-tune when enabled. */
178    if (enabled)
179        return rda5807_update_reg(radio, RDA5807_REG_CHAN,
180                      RDA5807_MASK_CHAN_TUNE,
181                      RDA5807_MASK_CHAN_TUNE);
182    else
183        return 0;
174184}
175185
176186static int rda5807_set_mute(struct rda5807_driver *radio, int muted)

Archive Download the corresponding diff file



interactive