tea575x.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. /*
  2. * ALSA driver for TEA5757/5759 Philips AM/FM radio tuner chips
  3. *
  4. * Copyright (c) 2004 Jaroslav Kysela <perex@perex.cz>
  5. *
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. *
  21. */
  22. #include <linux/delay.h>
  23. #include <linux/module.h>
  24. #include <linux/init.h>
  25. #include <linux/slab.h>
  26. #include <linux/sched.h>
  27. #include <asm/io.h>
  28. #include <media/v4l2-device.h>
  29. #include <media/v4l2-dev.h>
  30. #include <media/v4l2-fh.h>
  31. #include <media/v4l2-ioctl.h>
  32. #include <media/v4l2-event.h>
  33. #include <media/tea575x.h>
  34. MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>");
  35. MODULE_DESCRIPTION("Routines for control of TEA5757/5759 Philips AM/FM radio tuner chips");
  36. MODULE_LICENSE("GPL");
  37. /*
  38. * definitions
  39. */
  40. #define TEA575X_BIT_SEARCH (1<<24) /* 1 = search action, 0 = tuned */
  41. #define TEA575X_BIT_UPDOWN (1<<23) /* 0 = search down, 1 = search up */
  42. #define TEA575X_BIT_MONO (1<<22) /* 0 = stereo, 1 = mono */
  43. #define TEA575X_BIT_BAND_MASK (3<<20)
  44. #define TEA575X_BIT_BAND_FM (0<<20)
  45. #define TEA575X_BIT_BAND_MW (1<<20)
  46. #define TEA575X_BIT_BAND_LW (2<<20)
  47. #define TEA575X_BIT_BAND_SW (3<<20)
  48. #define TEA575X_BIT_PORT_0 (1<<19) /* user bit */
  49. #define TEA575X_BIT_PORT_1 (1<<18) /* user bit */
  50. #define TEA575X_BIT_SEARCH_MASK (3<<16) /* search level */
  51. #define TEA575X_BIT_SEARCH_5_28 (0<<16) /* FM >5uV, AM >28uV */
  52. #define TEA575X_BIT_SEARCH_10_40 (1<<16) /* FM >10uV, AM > 40uV */
  53. #define TEA575X_BIT_SEARCH_30_63 (2<<16) /* FM >30uV, AM > 63uV */
  54. #define TEA575X_BIT_SEARCH_150_1000 (3<<16) /* FM > 150uV, AM > 1000uV */
  55. #define TEA575X_BIT_DUMMY (1<<15) /* buffer */
  56. #define TEA575X_BIT_FREQ_MASK 0x7fff
  57. enum { BAND_FM, BAND_FM_JAPAN, BAND_AM };
  58. static const struct v4l2_frequency_band bands[] = {
  59. {
  60. .type = V4L2_TUNER_RADIO,
  61. .index = 0,
  62. .capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO |
  63. V4L2_TUNER_CAP_FREQ_BANDS,
  64. .rangelow = 87500 * 16,
  65. .rangehigh = 108000 * 16,
  66. .modulation = V4L2_BAND_MODULATION_FM,
  67. },
  68. {
  69. .type = V4L2_TUNER_RADIO,
  70. .index = 0,
  71. .capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO |
  72. V4L2_TUNER_CAP_FREQ_BANDS,
  73. .rangelow = 76000 * 16,
  74. .rangehigh = 91000 * 16,
  75. .modulation = V4L2_BAND_MODULATION_FM,
  76. },
  77. {
  78. .type = V4L2_TUNER_RADIO,
  79. .index = 1,
  80. .capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_FREQ_BANDS,
  81. .rangelow = 530 * 16,
  82. .rangehigh = 1710 * 16,
  83. .modulation = V4L2_BAND_MODULATION_AM,
  84. },
  85. };
  86. /*
  87. * lowlevel part
  88. */
  89. static void snd_tea575x_write(struct snd_tea575x *tea, unsigned int val)
  90. {
  91. u16 l;
  92. u8 data;
  93. if (tea->ops->write_val)
  94. return tea->ops->write_val(tea, val);
  95. tea->ops->set_direction(tea, 1);
  96. udelay(16);
  97. for (l = 25; l > 0; l--) {
  98. data = (val >> 24) & TEA575X_DATA;
  99. val <<= 1; /* shift data */
  100. tea->ops->set_pins(tea, data | TEA575X_WREN);
  101. udelay(2);
  102. tea->ops->set_pins(tea, data | TEA575X_WREN | TEA575X_CLK);
  103. udelay(2);
  104. tea->ops->set_pins(tea, data | TEA575X_WREN);
  105. udelay(2);
  106. }
  107. if (!tea->mute)
  108. tea->ops->set_pins(tea, 0);
  109. }
  110. static u32 snd_tea575x_read(struct snd_tea575x *tea)
  111. {
  112. u16 l, rdata;
  113. u32 data = 0;
  114. if (tea->ops->read_val)
  115. return tea->ops->read_val(tea);
  116. tea->ops->set_direction(tea, 0);
  117. tea->ops->set_pins(tea, 0);
  118. udelay(16);
  119. for (l = 24; l--;) {
  120. tea->ops->set_pins(tea, TEA575X_CLK);
  121. udelay(2);
  122. if (!l)
  123. tea->tuned = tea->ops->get_pins(tea) & TEA575X_MOST ? 0 : 1;
  124. tea->ops->set_pins(tea, 0);
  125. udelay(2);
  126. data <<= 1; /* shift data */
  127. rdata = tea->ops->get_pins(tea);
  128. if (!l)
  129. tea->stereo = (rdata & TEA575X_MOST) ? 0 : 1;
  130. if (rdata & TEA575X_DATA)
  131. data++;
  132. udelay(2);
  133. }
  134. if (tea->mute)
  135. tea->ops->set_pins(tea, TEA575X_WREN);
  136. return data;
  137. }
  138. static u32 snd_tea575x_val_to_freq(struct snd_tea575x *tea, u32 val)
  139. {
  140. u32 freq = val & TEA575X_BIT_FREQ_MASK;
  141. if (freq == 0)
  142. return freq;
  143. switch (tea->band) {
  144. case BAND_FM:
  145. /* freq *= 12.5 */
  146. freq *= 125;
  147. freq /= 10;
  148. /* crystal fixup */
  149. freq -= TEA575X_FMIF;
  150. break;
  151. case BAND_FM_JAPAN:
  152. /* freq *= 12.5 */
  153. freq *= 125;
  154. freq /= 10;
  155. /* crystal fixup */
  156. freq += TEA575X_FMIF;
  157. break;
  158. case BAND_AM:
  159. /* crystal fixup */
  160. freq -= TEA575X_AMIF;
  161. break;
  162. }
  163. return clamp(freq * 16, bands[tea->band].rangelow,
  164. bands[tea->band].rangehigh); /* from kHz */
  165. }
  166. static u32 snd_tea575x_get_freq(struct snd_tea575x *tea)
  167. {
  168. return snd_tea575x_val_to_freq(tea, snd_tea575x_read(tea));
  169. }
  170. void snd_tea575x_set_freq(struct snd_tea575x *tea)
  171. {
  172. u32 freq = tea->freq / 16; /* to kHz */
  173. u32 band = 0;
  174. switch (tea->band) {
  175. case BAND_FM:
  176. band = TEA575X_BIT_BAND_FM;
  177. /* crystal fixup */
  178. freq += TEA575X_FMIF;
  179. /* freq /= 12.5 */
  180. freq *= 10;
  181. freq /= 125;
  182. break;
  183. case BAND_FM_JAPAN:
  184. band = TEA575X_BIT_BAND_FM;
  185. /* crystal fixup */
  186. freq -= TEA575X_FMIF;
  187. /* freq /= 12.5 */
  188. freq *= 10;
  189. freq /= 125;
  190. break;
  191. case BAND_AM:
  192. band = TEA575X_BIT_BAND_MW;
  193. /* crystal fixup */
  194. freq += TEA575X_AMIF;
  195. break;
  196. }
  197. tea->val &= ~(TEA575X_BIT_FREQ_MASK | TEA575X_BIT_BAND_MASK);
  198. tea->val |= band;
  199. tea->val |= freq & TEA575X_BIT_FREQ_MASK;
  200. snd_tea575x_write(tea, tea->val);
  201. tea->freq = snd_tea575x_val_to_freq(tea, tea->val);
  202. }
  203. /*
  204. * Linux Video interface
  205. */
  206. static int vidioc_querycap(struct file *file, void *priv,
  207. struct v4l2_capability *v)
  208. {
  209. struct snd_tea575x *tea = video_drvdata(file);
  210. strlcpy(v->driver, tea->v4l2_dev->name, sizeof(v->driver));
  211. strlcpy(v->card, tea->card, sizeof(v->card));
  212. strlcat(v->card, tea->tea5759 ? " TEA5759" : " TEA5757", sizeof(v->card));
  213. strlcpy(v->bus_info, tea->bus_info, sizeof(v->bus_info));
  214. v->device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO;
  215. if (!tea->cannot_read_data)
  216. v->device_caps |= V4L2_CAP_HW_FREQ_SEEK;
  217. v->capabilities = v->device_caps | V4L2_CAP_DEVICE_CAPS;
  218. return 0;
  219. }
  220. int snd_tea575x_enum_freq_bands(struct snd_tea575x *tea,
  221. struct v4l2_frequency_band *band)
  222. {
  223. int index;
  224. if (band->tuner != 0)
  225. return -EINVAL;
  226. switch (band->index) {
  227. case 0:
  228. if (tea->tea5759)
  229. index = BAND_FM_JAPAN;
  230. else
  231. index = BAND_FM;
  232. break;
  233. case 1:
  234. if (tea->has_am) {
  235. index = BAND_AM;
  236. break;
  237. }
  238. /* Fall through */
  239. default:
  240. return -EINVAL;
  241. }
  242. *band = bands[index];
  243. if (!tea->cannot_read_data)
  244. band->capability |= V4L2_TUNER_CAP_HWSEEK_BOUNDED;
  245. return 0;
  246. }
  247. EXPORT_SYMBOL(snd_tea575x_enum_freq_bands);
  248. static int vidioc_enum_freq_bands(struct file *file, void *priv,
  249. struct v4l2_frequency_band *band)
  250. {
  251. struct snd_tea575x *tea = video_drvdata(file);
  252. return snd_tea575x_enum_freq_bands(tea, band);
  253. }
  254. int snd_tea575x_g_tuner(struct snd_tea575x *tea, struct v4l2_tuner *v)
  255. {
  256. struct v4l2_frequency_band band_fm = { 0, };
  257. if (v->index > 0)
  258. return -EINVAL;
  259. snd_tea575x_read(tea);
  260. snd_tea575x_enum_freq_bands(tea, &band_fm);
  261. memset(v, 0, sizeof(*v));
  262. strlcpy(v->name, tea->has_am ? "FM/AM" : "FM", sizeof(v->name));
  263. v->type = V4L2_TUNER_RADIO;
  264. v->capability = band_fm.capability;
  265. v->rangelow = tea->has_am ? bands[BAND_AM].rangelow : band_fm.rangelow;
  266. v->rangehigh = band_fm.rangehigh;
  267. v->rxsubchans = tea->stereo ? V4L2_TUNER_SUB_STEREO : V4L2_TUNER_SUB_MONO;
  268. v->audmode = (tea->val & TEA575X_BIT_MONO) ?
  269. V4L2_TUNER_MODE_MONO : V4L2_TUNER_MODE_STEREO;
  270. v->signal = tea->tuned ? 0xffff : 0;
  271. return 0;
  272. }
  273. EXPORT_SYMBOL(snd_tea575x_g_tuner);
  274. static int vidioc_g_tuner(struct file *file, void *priv,
  275. struct v4l2_tuner *v)
  276. {
  277. struct snd_tea575x *tea = video_drvdata(file);
  278. return snd_tea575x_g_tuner(tea, v);
  279. }
  280. static int vidioc_s_tuner(struct file *file, void *priv,
  281. const struct v4l2_tuner *v)
  282. {
  283. struct snd_tea575x *tea = video_drvdata(file);
  284. u32 orig_val = tea->val;
  285. if (v->index)
  286. return -EINVAL;
  287. tea->val &= ~TEA575X_BIT_MONO;
  288. if (v->audmode == V4L2_TUNER_MODE_MONO)
  289. tea->val |= TEA575X_BIT_MONO;
  290. /* Only apply changes if currently tuning FM */
  291. if (tea->band != BAND_AM && tea->val != orig_val)
  292. snd_tea575x_set_freq(tea);
  293. return 0;
  294. }
  295. static int vidioc_g_frequency(struct file *file, void *priv,
  296. struct v4l2_frequency *f)
  297. {
  298. struct snd_tea575x *tea = video_drvdata(file);
  299. if (f->tuner != 0)
  300. return -EINVAL;
  301. f->type = V4L2_TUNER_RADIO;
  302. f->frequency = tea->freq;
  303. return 0;
  304. }
  305. static int vidioc_s_frequency(struct file *file, void *priv,
  306. const struct v4l2_frequency *f)
  307. {
  308. struct snd_tea575x *tea = video_drvdata(file);
  309. if (f->tuner != 0 || f->type != V4L2_TUNER_RADIO)
  310. return -EINVAL;
  311. if (tea->has_am && f->frequency < (20000 * 16))
  312. tea->band = BAND_AM;
  313. else if (tea->tea5759)
  314. tea->band = BAND_FM_JAPAN;
  315. else
  316. tea->band = BAND_FM;
  317. tea->freq = clamp_t(u32, f->frequency, bands[tea->band].rangelow,
  318. bands[tea->band].rangehigh);
  319. snd_tea575x_set_freq(tea);
  320. return 0;
  321. }
  322. int snd_tea575x_s_hw_freq_seek(struct file *file, struct snd_tea575x *tea,
  323. const struct v4l2_hw_freq_seek *a)
  324. {
  325. unsigned long timeout;
  326. int i, spacing;
  327. if (tea->cannot_read_data)
  328. return -ENOTTY;
  329. if (a->tuner || a->wrap_around)
  330. return -EINVAL;
  331. if (file->f_flags & O_NONBLOCK)
  332. return -EWOULDBLOCK;
  333. if (a->rangelow || a->rangehigh) {
  334. for (i = 0; i < ARRAY_SIZE(bands); i++) {
  335. if ((i == BAND_FM && tea->tea5759) ||
  336. (i == BAND_FM_JAPAN && !tea->tea5759) ||
  337. (i == BAND_AM && !tea->has_am))
  338. continue;
  339. if (bands[i].rangelow == a->rangelow &&
  340. bands[i].rangehigh == a->rangehigh)
  341. break;
  342. }
  343. if (i == ARRAY_SIZE(bands))
  344. return -EINVAL; /* No matching band found */
  345. if (i != tea->band) {
  346. tea->band = i;
  347. tea->freq = clamp(tea->freq, bands[i].rangelow,
  348. bands[i].rangehigh);
  349. snd_tea575x_set_freq(tea);
  350. }
  351. }
  352. spacing = (tea->band == BAND_AM) ? 5 : 50; /* kHz */
  353. /* clear the frequency, HW will fill it in */
  354. tea->val &= ~TEA575X_BIT_FREQ_MASK;
  355. tea->val |= TEA575X_BIT_SEARCH;
  356. if (a->seek_upward)
  357. tea->val |= TEA575X_BIT_UPDOWN;
  358. else
  359. tea->val &= ~TEA575X_BIT_UPDOWN;
  360. snd_tea575x_write(tea, tea->val);
  361. timeout = jiffies + msecs_to_jiffies(10000);
  362. for (;;) {
  363. if (time_after(jiffies, timeout))
  364. break;
  365. if (schedule_timeout_interruptible(msecs_to_jiffies(10))) {
  366. /* some signal arrived, stop search */
  367. tea->val &= ~TEA575X_BIT_SEARCH;
  368. snd_tea575x_set_freq(tea);
  369. return -ERESTARTSYS;
  370. }
  371. if (!(snd_tea575x_read(tea) & TEA575X_BIT_SEARCH)) {
  372. u32 freq;
  373. /* Found a frequency, wait until it can be read */
  374. for (i = 0; i < 100; i++) {
  375. msleep(10);
  376. freq = snd_tea575x_get_freq(tea);
  377. if (freq) /* available */
  378. break;
  379. }
  380. if (freq == 0) /* shouldn't happen */
  381. break;
  382. /*
  383. * if we moved by less than the spacing, or in the
  384. * wrong direction, continue seeking
  385. */
  386. if (abs(tea->freq - freq) < 16 * spacing ||
  387. (a->seek_upward && freq < tea->freq) ||
  388. (!a->seek_upward && freq > tea->freq)) {
  389. snd_tea575x_write(tea, tea->val);
  390. continue;
  391. }
  392. tea->freq = freq;
  393. tea->val &= ~TEA575X_BIT_SEARCH;
  394. return 0;
  395. }
  396. }
  397. tea->val &= ~TEA575X_BIT_SEARCH;
  398. snd_tea575x_set_freq(tea);
  399. return -ENODATA;
  400. }
  401. EXPORT_SYMBOL(snd_tea575x_s_hw_freq_seek);
  402. static int vidioc_s_hw_freq_seek(struct file *file, void *fh,
  403. const struct v4l2_hw_freq_seek *a)
  404. {
  405. struct snd_tea575x *tea = video_drvdata(file);
  406. return snd_tea575x_s_hw_freq_seek(file, tea, a);
  407. }
  408. static int tea575x_s_ctrl(struct v4l2_ctrl *ctrl)
  409. {
  410. struct snd_tea575x *tea = container_of(ctrl->handler, struct snd_tea575x, ctrl_handler);
  411. switch (ctrl->id) {
  412. case V4L2_CID_AUDIO_MUTE:
  413. tea->mute = ctrl->val;
  414. snd_tea575x_set_freq(tea);
  415. return 0;
  416. }
  417. return -EINVAL;
  418. }
  419. static const struct v4l2_file_operations tea575x_fops = {
  420. .unlocked_ioctl = video_ioctl2,
  421. .open = v4l2_fh_open,
  422. .release = v4l2_fh_release,
  423. .poll = v4l2_ctrl_poll,
  424. };
  425. static const struct v4l2_ioctl_ops tea575x_ioctl_ops = {
  426. .vidioc_querycap = vidioc_querycap,
  427. .vidioc_g_tuner = vidioc_g_tuner,
  428. .vidioc_s_tuner = vidioc_s_tuner,
  429. .vidioc_g_frequency = vidioc_g_frequency,
  430. .vidioc_s_frequency = vidioc_s_frequency,
  431. .vidioc_s_hw_freq_seek = vidioc_s_hw_freq_seek,
  432. .vidioc_enum_freq_bands = vidioc_enum_freq_bands,
  433. .vidioc_log_status = v4l2_ctrl_log_status,
  434. .vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
  435. .vidioc_unsubscribe_event = v4l2_event_unsubscribe,
  436. };
  437. static const struct video_device tea575x_radio = {
  438. .ioctl_ops = &tea575x_ioctl_ops,
  439. .release = video_device_release_empty,
  440. };
  441. static const struct v4l2_ctrl_ops tea575x_ctrl_ops = {
  442. .s_ctrl = tea575x_s_ctrl,
  443. };
  444. int snd_tea575x_hw_init(struct snd_tea575x *tea)
  445. {
  446. tea->mute = true;
  447. /* Not all devices can or know how to read the data back.
  448. Such devices can set cannot_read_data to true. */
  449. if (!tea->cannot_read_data) {
  450. snd_tea575x_write(tea, 0x55AA);
  451. if (snd_tea575x_read(tea) != 0x55AA)
  452. return -ENODEV;
  453. }
  454. tea->val = TEA575X_BIT_BAND_FM | TEA575X_BIT_SEARCH_5_28;
  455. tea->freq = 90500 * 16; /* 90.5Mhz default */
  456. snd_tea575x_set_freq(tea);
  457. return 0;
  458. }
  459. EXPORT_SYMBOL(snd_tea575x_hw_init);
  460. int snd_tea575x_init(struct snd_tea575x *tea, struct module *owner)
  461. {
  462. int retval = snd_tea575x_hw_init(tea);
  463. if (retval)
  464. return retval;
  465. tea->vd = tea575x_radio;
  466. video_set_drvdata(&tea->vd, tea);
  467. mutex_init(&tea->mutex);
  468. strlcpy(tea->vd.name, tea->v4l2_dev->name, sizeof(tea->vd.name));
  469. tea->vd.lock = &tea->mutex;
  470. tea->vd.v4l2_dev = tea->v4l2_dev;
  471. tea->fops = tea575x_fops;
  472. tea->fops.owner = owner;
  473. tea->vd.fops = &tea->fops;
  474. /* disable hw_freq_seek if we can't use it */
  475. if (tea->cannot_read_data)
  476. v4l2_disable_ioctl(&tea->vd, VIDIOC_S_HW_FREQ_SEEK);
  477. if (!tea->cannot_mute) {
  478. tea->vd.ctrl_handler = &tea->ctrl_handler;
  479. v4l2_ctrl_handler_init(&tea->ctrl_handler, 1);
  480. v4l2_ctrl_new_std(&tea->ctrl_handler, &tea575x_ctrl_ops,
  481. V4L2_CID_AUDIO_MUTE, 0, 1, 1, 1);
  482. retval = tea->ctrl_handler.error;
  483. if (retval) {
  484. v4l2_err(tea->v4l2_dev, "can't initialize controls\n");
  485. v4l2_ctrl_handler_free(&tea->ctrl_handler);
  486. return retval;
  487. }
  488. if (tea->ext_init) {
  489. retval = tea->ext_init(tea);
  490. if (retval) {
  491. v4l2_ctrl_handler_free(&tea->ctrl_handler);
  492. return retval;
  493. }
  494. }
  495. v4l2_ctrl_handler_setup(&tea->ctrl_handler);
  496. }
  497. retval = video_register_device(&tea->vd, VFL_TYPE_RADIO, tea->radio_nr);
  498. if (retval) {
  499. v4l2_err(tea->v4l2_dev, "can't register video device!\n");
  500. v4l2_ctrl_handler_free(tea->vd.ctrl_handler);
  501. return retval;
  502. }
  503. return 0;
  504. }
  505. void snd_tea575x_exit(struct snd_tea575x *tea)
  506. {
  507. video_unregister_device(&tea->vd);
  508. v4l2_ctrl_handler_free(tea->vd.ctrl_handler);
  509. }
  510. static int __init alsa_tea575x_module_init(void)
  511. {
  512. return 0;
  513. }
  514. static void __exit alsa_tea575x_module_exit(void)
  515. {
  516. }
  517. module_init(alsa_tea575x_module_init)
  518. module_exit(alsa_tea575x_module_exit)
  519. EXPORT_SYMBOL(snd_tea575x_init);
  520. EXPORT_SYMBOL(snd_tea575x_exit);
  521. EXPORT_SYMBOL(snd_tea575x_set_freq);