mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
ALSA: tea575x: unify read/write functions
Implement generic read/write functions to access TEA575x tuners. They're now implemented 4 times (once in es1968 and 3 times in fm801). This also allows mute to work on all cards. Also improve tuner detection/initialization. Signed-off-by: Ondrej Zary <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
This commit is contained in:
parent
59bb7f0eeb
commit
14219d0659
2 changed files with 81 additions and 30 deletions
|
|
@ -26,12 +26,17 @@
|
|||
#include <media/v4l2-dev.h>
|
||||
#include <media/v4l2-ioctl.h>
|
||||
|
||||
#define TEA575X_DATA (1 << 0)
|
||||
#define TEA575X_CLK (1 << 1)
|
||||
#define TEA575X_WREN (1 << 2)
|
||||
#define TEA575X_MOST (1 << 3)
|
||||
|
||||
struct snd_tea575x;
|
||||
|
||||
struct snd_tea575x_ops {
|
||||
void (*write)(struct snd_tea575x *tea, unsigned int val);
|
||||
unsigned int (*read)(struct snd_tea575x *tea);
|
||||
void (*mute)(struct snd_tea575x *tea, unsigned int mute);
|
||||
void (*set_pins)(struct snd_tea575x *tea, u8 pins);
|
||||
u8 (*get_pins)(struct snd_tea575x *tea);
|
||||
void (*set_direction)(struct snd_tea575x *tea, bool output);
|
||||
};
|
||||
|
||||
struct snd_tea575x {
|
||||
|
|
@ -49,7 +54,7 @@ struct snd_tea575x {
|
|||
void *private_data;
|
||||
};
|
||||
|
||||
void snd_tea575x_init(struct snd_tea575x *tea);
|
||||
int snd_tea575x_init(struct snd_tea575x *tea);
|
||||
void snd_tea575x_exit(struct snd_tea575x *tea);
|
||||
|
||||
#endif /* __SOUND_TEA575X_TUNER_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue