41 #include <linux/module.h>
45 #include <linux/videodev2.h>
48 #include <linux/slab.h>
58 #ifndef CONFIG_RADIO_ZOLTRIX_PORT
59 #define CONFIG_RADIO_ZOLTRIX_PORT -1
92 if (mute || vol == 0) {
111 bool stereo = isa->
stereo;
115 v4l2_warn(v4l2_dev,
"cannot set a frequency of 0.\n");
119 m = (freq / 160 - 8800) * 2;
120 f = (
unsigned long long)m + 0x4d1c;
122 bitmask = 0xc480402c10080000ull;
132 bitmask = (bitmask ^ ((f & 0xff) << 47) ^ ((f & 0xff00) << 30) ^ (stereo << 31));
134 if ((bitmask & 0x8000000000000000ull) != 0) {
159 return zoltrix_s_mute_volume(isa, zol->
muted, zol->
curvol);
176 return (a == b && a == 0xcf) ?
197 return (a == 0xcf || a == 0xdf || a == 0xef) ? 0xffff : 0;
200 static int zoltrix_s_stereo(
struct radio_isa_card *isa,
bool stereo)
202 return zoltrix_s_frequency(isa, isa->
freq);
206 .alloc = zoltrix_alloc,
207 .s_mute_volume = zoltrix_s_mute_volume,
208 .s_frequency = zoltrix_s_frequency,
209 .s_stereo = zoltrix_s_stereo,
210 .g_rxsubchans = zoltrix_g_rxsubchans,
211 .g_signal = zoltrix_g_signal,
214 static const int zoltrix_ioports[] = { 0x20c, 0x30c };
222 .name =
"radio-zoltrix",
226 .radio_nr_params = radio_nr,
227 .io_ports = zoltrix_ioports,
228 .num_of_io_ports =
ARRAY_SIZE(zoltrix_ioports),
230 .card =
"Zoltrix Radio Plus",
236 static int __init zoltrix_init(
void)
241 static void __exit zoltrix_exit(
void)