aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-aztech.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/radio/radio-aztech.c')
-rw-r--r--drivers/media/radio/radio-aztech.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/media/radio/radio-aztech.c b/drivers/media/radio/radio-aztech.c
index 2f5671f2e17e..705dd6f9162c 100644
--- a/drivers/media/radio/radio-aztech.c
+++ b/drivers/media/radio/radio-aztech.c
@@ -94,21 +94,16 @@ static int aztech_s_frequency(struct radio_isa_card *isa, u32 freq)
94 return 0; 94 return 0;
95} 95}
96 96
97/* thanks to Michael Dwyer for giving me a dose of clues in
98 * the signal strength department..
99 *
100 * This card has a stereo bit - bit 0 set = mono, not set = stereo
101 */
102static u32 aztech_g_rxsubchans(struct radio_isa_card *isa) 97static u32 aztech_g_rxsubchans(struct radio_isa_card *isa)
103{ 98{
104 if (inb(isa->io) & 1) 99 if (inb(isa->io) & AZTECH_BIT_MONO)
105 return V4L2_TUNER_SUB_MONO; 100 return V4L2_TUNER_SUB_MONO;
106 return V4L2_TUNER_SUB_STEREO; 101 return V4L2_TUNER_SUB_STEREO;
107} 102}
108 103
109static int aztech_s_stereo(struct radio_isa_card *isa, bool stereo) 104static u32 aztech_g_signal(struct radio_isa_card *isa)
110{ 105{
111 return aztech_s_frequency(isa, isa->freq); 106 return (inb(isa->io) & AZTECH_BIT_NOT_TUNED) ? 0 : 0xffff;
112} 107}
113 108
114static int aztech_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol) 109static int aztech_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol)
@@ -126,8 +121,8 @@ static const struct radio_isa_ops aztech_ops = {
126 .alloc = aztech_alloc, 121 .alloc = aztech_alloc,
127 .s_mute_volume = aztech_s_mute_volume, 122 .s_mute_volume = aztech_s_mute_volume,
128 .s_frequency = aztech_s_frequency, 123 .s_frequency = aztech_s_frequency,
129 .s_stereo = aztech_s_stereo,
130 .g_rxsubchans = aztech_g_rxsubchans, 124 .g_rxsubchans = aztech_g_rxsubchans,
125 .g_signal = aztech_g_signal,
131}; 126};
132 127
133static const int aztech_ioports[] = { 0x350, 0x358 }; 128static const int aztech_ioports[] = { 0x350, 0x358 };