Lines Matching defs:codec

29  * on the codec. Hence we here tell the codec what
48 /* codec dependent bit to be set in the aoa_codec.connected field.
50 * fabric has to know the codec anyway and all codecs might have
594 request_module("snd-aoa-codec-%s", l->codecs[i].name);
768 static int check_codec(struct aoa_codec *codec,
776 /* if the codec has a 'codec' node, we require a reference */
777 if (of_node_name_eq(codec->node, "codec")) {
779 "platform-%s-codec-ref", codec->name);
786 if (*ref != codec->node->phandle) {
798 codec->soundbus_dev = ldev->sdev;
799 codec->gpio = &ldev->gpio;
805 printk(KERN_INFO "snd-aoa-fabric-layout: can use this codec\n");
807 codec->connected = 0;
808 codec->fabric_data = cc;
811 codec->connected |= 1<<cc->codec_bit;
818 static int layout_found_codec(struct aoa_codec *codec)
827 if (strcmp(ldev->layout->codecs[i].name, codec->name) == 0) {
828 if (check_codec(codec,
838 static void layout_remove_codec(struct aoa_codec *codec)
841 /* here remove the codec from the layout dev's
842 * codec reference */
844 codec->soundbus_dev = NULL;
845 codec->gpio = NULL;
895 static void layout_attached_codec(struct aoa_codec *codec)
902 /* need to add this codec to our codec array! */
904 cc = codec->fabric_data;
906 headphones = codec->gpio->methods->get_detect(codec->gpio,
908 lineout = codec->gpio->methods->get_detect(codec->gpio,
911 if (codec->gpio->methods->set_master) {
912 ctl = snd_ctl_new1(&master_ctl, codec->gpio);
919 ldev->gpio.methods->set_speakers(codec->gpio, 1);
920 ctl = snd_ctl_new1(&speakers_ctl, codec->gpio);
926 ldev->gpio.methods->set_headphone(codec->gpio, 1);
927 ctl = snd_ctl_new1(&headphone_ctl, codec->gpio);
948 ldev->gpio.methods->set_lineout(codec->gpio, 1);
949 ctl = snd_ctl_new1(&lineout_ctl, codec->gpio);