Lines Matching defs:fmixer
43 struct snd_mixer_oss_file *fmixer;
59 fmixer = kzalloc(sizeof(*fmixer), GFP_KERNEL);
60 if (fmixer == NULL) {
64 fmixer->card = card;
65 fmixer->mixer = card->mixer_oss;
66 file->private_data = fmixer;
68 kfree(fmixer);
77 struct snd_mixer_oss_file *fmixer;
80 fmixer = (struct snd_mixer_oss_file *) file->private_data;
81 module_put(fmixer->card->module);
82 snd_card_file_remove(fmixer->card, file);
83 kfree(fmixer);
88 static int snd_mixer_oss_info(struct snd_mixer_oss_file *fmixer,
91 struct snd_card *card = fmixer->card;
92 struct snd_mixer_oss *mixer = fmixer->mixer;
104 static int snd_mixer_oss_info_obsolete(struct snd_mixer_oss_file *fmixer,
107 struct snd_card *card = fmixer->card;
108 struct snd_mixer_oss *mixer = fmixer->mixer;
119 static int snd_mixer_oss_caps(struct snd_mixer_oss_file *fmixer)
121 struct snd_mixer_oss *mixer = fmixer->mixer;
131 static int snd_mixer_oss_devmask(struct snd_mixer_oss_file *fmixer)
133 struct snd_mixer_oss *mixer = fmixer->mixer;
147 static int snd_mixer_oss_stereodevs(struct snd_mixer_oss_file *fmixer)
149 struct snd_mixer_oss *mixer = fmixer->mixer;
163 static int snd_mixer_oss_recmask(struct snd_mixer_oss_file *fmixer)
165 struct snd_mixer_oss *mixer = fmixer->mixer;
184 static int snd_mixer_oss_get_recsrc(struct snd_mixer_oss_file *fmixer)
186 struct snd_mixer_oss *mixer = fmixer->mixer;
193 if ((err = mixer->get_recsrc(fmixer, &result)) < 0)
203 pslot->get_recsrc(fmixer, pslot, &active);
212 static int snd_mixer_oss_set_recsrc(struct snd_mixer_oss_file *fmixer, int recsrc)
214 struct snd_mixer_oss *mixer = fmixer->mixer;
224 mixer->put_recsrc(fmixer, ffz(~recsrc));
225 mixer->get_recsrc(fmixer, &result);
232 pslot->put_recsrc(fmixer, pslot, active);
240 pslot->get_recsrc(fmixer, pslot, &active);
249 static int snd_mixer_oss_get_volume(struct snd_mixer_oss_file *fmixer, int slot)
251 struct snd_mixer_oss *mixer = fmixer->mixer;
261 result = pslot->get_volume(fmixer, pslot, &left, &right);
276 static int snd_mixer_oss_set_volume(struct snd_mixer_oss_file *fmixer,
279 struct snd_mixer_oss *mixer = fmixer->mixer;
293 result = pslot->put_volume(fmixer, pslot, left, right);
301 static int snd_mixer_oss_ioctl1(struct snd_mixer_oss_file *fmixer, unsigned int cmd, unsigned long arg)
307 if (snd_BUG_ON(!fmixer))
312 return snd_mixer_oss_info(fmixer, argp);
314 return snd_mixer_oss_info_obsolete(fmixer, argp);
318 tmp = snd_mixer_oss_set_recsrc(fmixer, tmp);
327 tmp = snd_mixer_oss_devmask(fmixer);
332 tmp = snd_mixer_oss_stereodevs(fmixer);
337 tmp = snd_mixer_oss_recmask(fmixer);
342 tmp = snd_mixer_oss_caps(fmixer);
347 tmp = snd_mixer_oss_get_recsrc(fmixer);
356 tmp = snd_mixer_oss_set_volume(fmixer, cmd & 0xff, tmp);
361 tmp = snd_mixer_oss_get_volume(fmixer, cmd & 0xff);
376 struct snd_mixer_oss_file fmixer;
382 memset(&fmixer, 0, sizeof(fmixer));
383 fmixer.card = card;
384 fmixer.mixer = card->mixer_oss;
385 return snd_mixer_oss_ioctl1(&fmixer, cmd, arg);
489 static void snd_mixer_oss_get_volume1_vol(struct snd_mixer_oss_file *fmixer,
497 struct snd_card *card = fmixer->card;
526 static void snd_mixer_oss_get_volume1_sw(struct snd_mixer_oss_file *fmixer,
535 struct snd_card *card = fmixer->card;
565 static int snd_mixer_oss_get_volume1(struct snd_mixer_oss_file *fmixer,
573 snd_mixer_oss_get_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, right);
575 snd_mixer_oss_get_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GVOLUME], left, right);
577 snd_mixer_oss_get_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GLOBAL], left, right);
580 snd_mixer_oss_get_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PSWITCH], left, right, 0);
582 snd_mixer_oss_get_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GSWITCH], left, right, 0);
584 snd_mixer_oss_get_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PROUTE], left, right, 1);
586 snd_mixer_oss_get_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GROUTE], left, right, 1);
591 static void snd_mixer_oss_put_volume1_vol(struct snd_mixer_oss_file *fmixer,
599 struct snd_card *card = fmixer->card;
631 static void snd_mixer_oss_put_volume1_sw(struct snd_mixer_oss_file *fmixer,
640 struct snd_card *card = fmixer->card;
676 static int snd_mixer_oss_put_volume1(struct snd_mixer_oss_file *fmixer,
683 snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, right);
685 snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CVOLUME], left, right);
687 snd_mixer_oss_put_volume1_vol(fmixer, pslot,
690 snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GVOLUME], left, right);
692 snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GLOBAL], left, right);
696 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PSWITCH], left, right, 0);
698 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], left, right, 0);
700 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GSWITCH], left, right, 0);
702 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PROUTE], left, right, 1);
704 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], left, right, 1);
706 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GROUTE], left, right, 1);
709 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PSWITCH], left, right, 0);
711 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], left, right, 0);
713 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GSWITCH], left, right, 0);
715 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PROUTE], left, right, 1);
717 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], left, right, 1);
719 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GROUTE], left, right, 1);
725 static int snd_mixer_oss_get_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
733 snd_mixer_oss_get_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], &left, &right, 0);
738 static int snd_mixer_oss_get_recsrc1_route(struct snd_mixer_oss_file *fmixer,
746 snd_mixer_oss_get_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], &left, &right, 1);
751 static int snd_mixer_oss_put_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
757 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], active, active, 0);
761 static int snd_mixer_oss_put_recsrc1_route(struct snd_mixer_oss_file *fmixer,
767 snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], active, active, 1);
771 static int snd_mixer_oss_get_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned int *active_index)
773 struct snd_card *card = fmixer->card;
774 struct snd_mixer_oss *mixer = fmixer->mixer;
821 static int snd_mixer_oss_put_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned int active_index)
823 struct snd_card *card = fmixer->card;
824 struct snd_mixer_oss *mixer = fmixer->mixer;
866 snd_ctl_notify(fmixer->card, SNDRV_CTL_EVENT_MASK_VALUE, &kctl->id);