From 31a62d415726d94bae5caf5f2e50232aa06babf6 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 18 May 2012 09:36:17 -0300 Subject: [media] snd_tea575x: Add write_/read_val operations Some devices which use the tea575x tuner chip don't allow bit banging the lines, instead they offer a method to directly set / get the contents of the 25 bit shift-register in the chip. Notably the Griffin radioSHARK USB radio receiver does this. Signed-off-by: Hans de Goede CC: Ondrej Zary Signed-off-by: Mauro Carvalho Chehab --- include/sound/tea575x-tuner.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/sound') diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h index 0c3c2fb..7bd6f61 100644 --- a/include/sound/tea575x-tuner.h +++ b/include/sound/tea575x-tuner.h @@ -37,6 +37,10 @@ struct snd_tea575x; struct snd_tea575x_ops { + /* Drivers using snd_tea575x must either define read_ and write_val */ + void (*write_val)(struct snd_tea575x *tea, u32 val); + u32 (*read_val)(struct snd_tea575x *tea); + /* Or define the 3 pin functions */ 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); -- cgit v1.1 From 3d0fe51cfa3d07751224c034f8226136a7dd05f2 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 18 May 2012 12:21:57 -0300 Subject: [media] snd_tea575x: Add a cannot_mute flag Some devices which use the tea575x tuner chip don't allow direct control over the IO pins, and thus cannot mute the audio output. Signed-off-by: Hans de Goede CC: Ondrej Zary Signed-off-by: Mauro Carvalho Chehab --- include/sound/tea575x-tuner.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sound') diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h index 7bd6f61..fe8590c 100644 --- a/include/sound/tea575x-tuner.h +++ b/include/sound/tea575x-tuner.h @@ -53,6 +53,7 @@ struct snd_tea575x { int radio_nr; /* radio_nr */ bool tea5759; /* 5759 chip is present */ bool cannot_read_data; /* Device cannot read the data pin */ + bool cannot_mute; /* Device cannot mute */ bool mute; /* Device is muted? */ bool stereo; /* receiving stereo */ bool tuned; /* tuned to a station */ -- cgit v1.1