26 #include <linux/slab.h>
27 #include <linux/module.h>
28 #include <linux/kernel.h>
29 #include <linux/device.h>
45 #define CX18_DEBUG_ALSA_INFO(fmt, arg...) \
47 if (cx18_alsa_debug & 2) \
48 printk(KERN_INFO "%s: " fmt, "cx18-alsa", ## arg); \
53 "Debug level (bitmask). Default: 0\n"
54 "\t\t\t 1/0x0001: warning\n"
55 "\t\t\t 2/0x0002: info\n");
67 return to_cx18(v4l2_dev)->alsa;
89 static void snd_cx18_card_private_free(
struct snd_card *
sc)
115 static int snd_cx18_card_set_names(
struct snd_cx18_card *cxsc)
129 "CX23418 #%d %s TV/FM Radio/Line-In Capture",
135 static int snd_cx18_init(
struct v4l2_device *v4l2_dev)
137 struct cx18 *cx = to_cx18(v4l2_dev);
158 ret = snd_cx18_card_create(v4l2_dev, sc, &cxsc);
160 CX18_ALSA_ERR(
"%s: snd_cx18_card_create() failed with err %d\n",
166 snd_cx18_card_set_names(cxsc);
171 CX18_ALSA_ERR(
"%s: snd_cx18_pcm_create() failed with err %d\n",
185 CX18_ALSA_ERR(
"%s: snd_card_register() failed with err %d\n",
205 if (v4l2_dev ==
NULL) {
211 cx = to_cx18(v4l2_dev);
220 "skipping\n", __func__);
230 if (snd_cx18_init(v4l2_dev)) {
240 static int __init cx18_alsa_init(
void)
262 if (v4l2_dev ==
NULL) {
268 cxsc = to_snd_cx18_card(v4l2_dev);
279 static void __exit cx18_alsa_exit(
void)