mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
[media] tea575x-tuner: move HW init to a separate function
Move HW initialization to separate function to allow using the code without the v4l parts. This is needed for use in the bttv driver. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
parent
b3ba8fa6b8
commit
8fd79579c9
@ -71,6 +71,7 @@ struct snd_tea575x {
|
|||||||
int (*ext_init)(struct snd_tea575x *tea);
|
int (*ext_init)(struct snd_tea575x *tea);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int snd_tea575x_hw_init(struct snd_tea575x *tea);
|
||||||
int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner);
|
int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner);
|
||||||
void snd_tea575x_exit(struct snd_tea575x *tea);
|
void snd_tea575x_exit(struct snd_tea575x *tea);
|
||||||
void snd_tea575x_set_freq(struct snd_tea575x *tea);
|
void snd_tea575x_set_freq(struct snd_tea575x *tea);
|
||||||
|
@ -486,13 +486,9 @@ static const struct v4l2_ctrl_ops tea575x_ctrl_ops = {
|
|||||||
.s_ctrl = tea575x_s_ctrl,
|
.s_ctrl = tea575x_s_ctrl,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* initialize all the tea575x chips
|
|
||||||
*/
|
|
||||||
int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner)
|
|
||||||
{
|
|
||||||
int retval;
|
|
||||||
|
|
||||||
|
int snd_tea575x_hw_init(struct snd_tea575x *tea)
|
||||||
|
{
|
||||||
tea->mute = true;
|
tea->mute = true;
|
||||||
|
|
||||||
/* Not all devices can or know how to read the data back.
|
/* Not all devices can or know how to read the data back.
|
||||||
@ -507,6 +503,17 @@ int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner)
|
|||||||
tea->freq = 90500 * 16; /* 90.5Mhz default */
|
tea->freq = 90500 * 16; /* 90.5Mhz default */
|
||||||
snd_tea575x_set_freq(tea);
|
snd_tea575x_set_freq(tea);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(snd_tea575x_hw_init);
|
||||||
|
|
||||||
|
int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner)
|
||||||
|
{
|
||||||
|
int retval = snd_tea575x_hw_init(tea);
|
||||||
|
|
||||||
|
if (retval)
|
||||||
|
return retval;
|
||||||
|
|
||||||
tea->vd = tea575x_radio;
|
tea->vd = tea575x_radio;
|
||||||
video_set_drvdata(&tea->vd, tea);
|
video_set_drvdata(&tea->vd, tea);
|
||||||
mutex_init(&tea->mutex);
|
mutex_init(&tea->mutex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user