Lines Matching refs:slot
259 static int snd_mixer_oss_get_volume(struct snd_mixer_oss_file *fmixer, int slot) in snd_mixer_oss_get_volume() argument
265 if (mixer == NULL || slot > 30) in snd_mixer_oss_get_volume()
267 pslot = &mixer->slots[slot]; in snd_mixer_oss_get_volume()
287 int slot, int volume) in snd_mixer_oss_set_volume() argument
293 if (mixer == NULL || slot > 30) in snd_mixer_oss_set_volume()
295 pslot = &mixer->slots[slot]; in snd_mixer_oss_set_volume()
447 static void snd_mixer_oss_recsrce_set(struct snd_card *card, int slot)
451 mixer->mask_recsrc |= 1 << slot;
454 static int snd_mixer_oss_recsrce_get(struct snd_card *card, int slot)
457 if (mixer && (mixer->mask_recsrc & (1 << slot)))
491 struct slot { struct
595 struct slot *slot = pslot->private_data; in snd_mixer_oss_get_volume1() local
598 if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) { in snd_mixer_oss_get_volume1()
599 …snd_mixer_oss_get_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, righ… in snd_mixer_oss_get_volume1()
600 } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GVOLUME) { in snd_mixer_oss_get_volume1()
601 …snd_mixer_oss_get_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GVOLUME], left, righ… in snd_mixer_oss_get_volume1()
602 } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GLOBAL) { in snd_mixer_oss_get_volume1()
603 …snd_mixer_oss_get_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GLOBAL], left, right… in snd_mixer_oss_get_volume1()
605 if (slot->present & SNDRV_MIXER_OSS_PRESENT_PSWITCH) { in snd_mixer_oss_get_volume1()
606 …snd_mixer_oss_get_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PSWITCH], left, right… in snd_mixer_oss_get_volume1()
607 } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GSWITCH) { in snd_mixer_oss_get_volume1()
608 …snd_mixer_oss_get_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GSWITCH], left, right… in snd_mixer_oss_get_volume1()
609 } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_PROUTE) { in snd_mixer_oss_get_volume1()
610 …snd_mixer_oss_get_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PROUTE], left, right,… in snd_mixer_oss_get_volume1()
611 } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GROUTE) { in snd_mixer_oss_get_volume1()
612 …snd_mixer_oss_get_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GROUTE], left, right,… in snd_mixer_oss_get_volume1()
706 struct slot *slot = pslot->private_data; in snd_mixer_oss_put_volume1() local
708 if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) { in snd_mixer_oss_put_volume1()
709 …snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, righ… in snd_mixer_oss_put_volume1()
710 if (slot->present & SNDRV_MIXER_OSS_PRESENT_CVOLUME) in snd_mixer_oss_put_volume1()
711 …snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CVOLUME], left, righ… in snd_mixer_oss_put_volume1()
712 } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_CVOLUME) { in snd_mixer_oss_put_volume1()
714 slot->numid[SNDRV_MIXER_OSS_ITEM_CVOLUME], left, right); in snd_mixer_oss_put_volume1()
715 } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GVOLUME) { in snd_mixer_oss_put_volume1()
716 …snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GVOLUME], left, righ… in snd_mixer_oss_put_volume1()
717 } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GLOBAL) { in snd_mixer_oss_put_volume1()
718 …snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GLOBAL], left, right… in snd_mixer_oss_put_volume1()
721 if (slot->present & SNDRV_MIXER_OSS_PRESENT_PSWITCH) in snd_mixer_oss_put_volume1()
722 …snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PSWITCH], left, right… in snd_mixer_oss_put_volume1()
723 if (slot->present & SNDRV_MIXER_OSS_PRESENT_CSWITCH) in snd_mixer_oss_put_volume1()
724 …snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], left, right… in snd_mixer_oss_put_volume1()
725 if (slot->present & SNDRV_MIXER_OSS_PRESENT_GSWITCH) in snd_mixer_oss_put_volume1()
726 …snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GSWITCH], left, right… in snd_mixer_oss_put_volume1()
727 if (slot->present & SNDRV_MIXER_OSS_PRESENT_PROUTE) in snd_mixer_oss_put_volume1()
728 …snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PROUTE], left, right,… in snd_mixer_oss_put_volume1()
729 if (slot->present & SNDRV_MIXER_OSS_PRESENT_CROUTE) in snd_mixer_oss_put_volume1()
730 …snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], left, right,… in snd_mixer_oss_put_volume1()
731 if (slot->present & SNDRV_MIXER_OSS_PRESENT_GROUTE) in snd_mixer_oss_put_volume1()
732 …snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GROUTE], left, right,… in snd_mixer_oss_put_volume1()
734 if (slot->present & SNDRV_MIXER_OSS_PRESENT_PSWITCH) { in snd_mixer_oss_put_volume1()
735 …snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PSWITCH], left, right… in snd_mixer_oss_put_volume1()
736 } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_CSWITCH) { in snd_mixer_oss_put_volume1()
737 …snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], left, right… in snd_mixer_oss_put_volume1()
738 } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GSWITCH) { in snd_mixer_oss_put_volume1()
739 …snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GSWITCH], left, right… in snd_mixer_oss_put_volume1()
740 } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_PROUTE) { in snd_mixer_oss_put_volume1()
741 …snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PROUTE], left, right,… in snd_mixer_oss_put_volume1()
742 } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_CROUTE) { in snd_mixer_oss_put_volume1()
743 …snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], left, right,… in snd_mixer_oss_put_volume1()
744 } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GROUTE) { in snd_mixer_oss_put_volume1()
745 …snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GROUTE], left, right,… in snd_mixer_oss_put_volume1()
755 struct slot *slot = pslot->private_data; in snd_mixer_oss_get_recsrc1_sw() local
759 …snd_mixer_oss_get_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], &left, &rig… in snd_mixer_oss_get_recsrc1_sw()
768 struct slot *slot = pslot->private_data; in snd_mixer_oss_get_recsrc1_route() local
772 …snd_mixer_oss_get_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], &left, &righ… in snd_mixer_oss_get_recsrc1_route()
781 struct slot *slot = pslot->private_data; in snd_mixer_oss_put_recsrc1_sw() local
783 …snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], active, act… in snd_mixer_oss_put_recsrc1_sw()
791 struct slot *slot = pslot->private_data; in snd_mixer_oss_put_recsrc1_route() local
793 …snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], active, acti… in snd_mixer_oss_put_recsrc1_route()
803 struct slot *slot; in snd_mixer_oss_get_recsrc2() local
828 slot = pslot->private_data; in snd_mixer_oss_get_recsrc2()
829 if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE) in snd_mixer_oss_get_recsrc2()
831 if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE)) in snd_mixer_oss_get_recsrc2()
833 if (slot->capture_item == uctl->value.enumerated.item[0]) { in snd_mixer_oss_get_recsrc2()
853 struct slot *slot = NULL; in snd_mixer_oss_put_recsrc2() local
877 slot = pslot->private_data; in snd_mixer_oss_put_recsrc2()
878 if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE) in snd_mixer_oss_put_recsrc2()
880 if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE)) in snd_mixer_oss_put_recsrc2()
884 slot = NULL; in snd_mixer_oss_put_recsrc2()
886 if (! slot) in snd_mixer_oss_put_recsrc2()
889 uctl->value.enumerated.item[idx] = slot->capture_item; in snd_mixer_oss_put_recsrc2()
908 static int snd_mixer_oss_build_test(struct snd_mixer_oss *mixer, struct slot *slot, const char *nam… in snd_mixer_oss_build_test() argument
931 slot->numid[item] = kcontrol->id.numid; in snd_mixer_oss_build_test()
933 if (info->count > slot->channels) in snd_mixer_oss_build_test()
934 slot->channels = info->count; in snd_mixer_oss_build_test()
935 slot->present |= 1 << item; in snd_mixer_oss_build_test()
942 struct slot *p = chn->private_data; in snd_mixer_oss_slot_free()
965 struct slot *slot) in snd_mixer_oss_build_test_all() argument
970 err = snd_mixer_oss_build_test(mixer, slot, ptr->name, ptr->index, in snd_mixer_oss_build_test_all()
975 err = snd_mixer_oss_build_test(mixer, slot, str, ptr->index, in snd_mixer_oss_build_test_all()
980 err = snd_mixer_oss_build_test(mixer, slot, str, ptr->index, in snd_mixer_oss_build_test_all()
985 err = snd_mixer_oss_build_test(mixer, slot, str, ptr->index, in snd_mixer_oss_build_test_all()
990 err = snd_mixer_oss_build_test(mixer, slot, str, ptr->index, in snd_mixer_oss_build_test_all()
995 err = snd_mixer_oss_build_test(mixer, slot, str, ptr->index, in snd_mixer_oss_build_test_all()
1000 err = snd_mixer_oss_build_test(mixer, slot, str, ptr->index, in snd_mixer_oss_build_test_all()
1005 err = snd_mixer_oss_build_test(mixer, slot, str, ptr->index, in snd_mixer_oss_build_test_all()
1010 err = snd_mixer_oss_build_test(mixer, slot, str, ptr->index, in snd_mixer_oss_build_test_all()
1015 err = snd_mixer_oss_build_test(mixer, slot, str, ptr->index, in snd_mixer_oss_build_test_all()
1030 struct slot slot; in snd_mixer_oss_build_input() local
1031 struct slot *pslot; in snd_mixer_oss_build_input()
1040 memset(&slot, 0, sizeof(slot)); in snd_mixer_oss_build_input()
1041 memset(slot.numid, 0xff, sizeof(slot.numid)); /* ID_UNKNOWN */ in snd_mixer_oss_build_input()
1042 if (snd_mixer_oss_build_test_all(mixer, ptr, &slot)) in snd_mixer_oss_build_input()
1064 slot.capture_item = 0; in snd_mixer_oss_build_input()
1066 slot.present |= SNDRV_MIXER_OSS_PRESENT_CAPTURE; in snd_mixer_oss_build_input()
1068 …for (slot.capture_item = 1; slot.capture_item < uinfo->value.enumerated.items; slot.capture_item++… in snd_mixer_oss_build_input()
1069 uinfo->value.enumerated.item = slot.capture_item; in snd_mixer_oss_build_input()
1076 slot.present |= SNDRV_MIXER_OSS_PRESENT_CAPTURE; in snd_mixer_oss_build_input()
1084 if (slot.present != 0) { in snd_mixer_oss_build_input()
1085 pslot = kmalloc(sizeof(slot), GFP_KERNEL); in snd_mixer_oss_build_input()
1088 *pslot = slot; in snd_mixer_oss_build_input()
1094 rslot->stereo = slot.channels > 1 ? 1 : 0; in snd_mixer_oss_build_input()
1098 if (slot.present & SNDRV_MIXER_OSS_PRESENT_CSWITCH) { in snd_mixer_oss_build_input()
1101 } else if (slot.present & SNDRV_MIXER_OSS_PRESENT_CROUTE) { in snd_mixer_oss_build_input()
1104 } else if (slot.present & SNDRV_MIXER_OSS_PRESENT_CAPTURE) { in snd_mixer_oss_build_input()
1158 struct slot *p; in snd_mixer_oss_proc_read()
1162 p = (struct slot *)mixer->slots[i].private_data; in snd_mixer_oss_proc_read()
1182 struct slot *slot; in snd_mixer_oss_proc_write() local
1209 slot = (struct slot *)mixer->slots[ch].private_data; in snd_mixer_oss_proc_write()
1210 if (slot && slot->assigned && in snd_mixer_oss_proc_write()
1211 slot->assigned->index == idx && ! strcmp(slot->assigned->name, str)) in snd_mixer_oss_proc_write()