Lines Matching refs:toonie
23 struct toonie { struct
26 #define codec_to_toonie(c) container_of(c, struct toonie, codec) argument
87 struct toonie *toonie = codec_to_toonie(codec); in toonie_init_codec() local
90 if (toonie->codec.connected != 1) in toonie_init_codec()
93 if (aoa_snd_device_new(SNDRV_DEV_CODEC, toonie, &ops)) { in toonie_init_codec()
98 if (toonie->codec.soundbus_dev->attach_codec(toonie->codec.soundbus_dev, in toonie_init_codec()
100 &toonie_codec_info, toonie)) { in toonie_init_codec()
102 snd_device_free(aoa_get_card(), toonie); in toonie_init_codec()
111 struct toonie *toonie = codec_to_toonie(codec); in toonie_exit_codec() local
113 if (!toonie->codec.soundbus_dev) { in toonie_exit_codec()
117 toonie->codec.soundbus_dev->detach_codec(toonie->codec.soundbus_dev, toonie); in toonie_exit_codec()
120 static struct toonie *toonie; variable
124 toonie = kzalloc(sizeof(struct toonie), GFP_KERNEL); in toonie_init()
126 if (!toonie) in toonie_init()
129 strscpy(toonie->codec.name, "toonie", sizeof(toonie->codec.name)); in toonie_init()
130 toonie->codec.owner = THIS_MODULE; in toonie_init()
131 toonie->codec.init = toonie_init_codec; in toonie_init()
132 toonie->codec.exit = toonie_exit_codec; in toonie_init()
134 if (aoa_codec_register(&toonie->codec)) { in toonie_init()
135 kfree(toonie); in toonie_init()
144 aoa_codec_unregister(&toonie->codec); in toonie_exit()
145 kfree(toonie); in toonie_exit()