Lines Matching +full:mic +full:- +full:int

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Driver for Digigram VX222 V2/Mic PCI soundcards
21 MODULE_DESCRIPTION("Digigram VX222 V2/Mic");
24 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
27 static bool mic[SNDRV_CARDS]; /* microphone */ variable
28 static int ibl[SNDRV_CARDS]; /* microphone */
30 module_param_array(index, int, NULL, 0444);
36 module_param_array(mic, bool, NULL, 0444);
37 MODULE_PARM_DESC(mic, "Enable Microphone.");
38 module_param_array(ibl, int, NULL, 0444);
61 static const DECLARE_TLV_DB_SCALE(db_scale_old_vol, -11350, 50, 0);
62 static const DECLARE_TLV_DB_SCALE(db_scale_akm, -7350, 50, 0);
90 .name = "VX222/Mic",
103 static int snd_vx222_create(struct snd_card *card, struct pci_dev *pci, in snd_vx222_create()
109 int i, err; in snd_vx222_create()
118 vx_ops = hw->type == VX_TYPE_BOARD ? &vx222_old_ops : &vx222_ops; in snd_vx222_create()
120 sizeof(struct snd_vx222) - sizeof(struct vx_core)); in snd_vx222_create()
122 return -ENOMEM; in snd_vx222_create()
124 vx->pci = pci; in snd_vx222_create()
130 vx->port[i] = pci_resource_start(pci, i + 1); in snd_vx222_create()
132 if (devm_request_threaded_irq(&pci->dev, pci->irq, snd_vx_irq_handler, in snd_vx222_create()
135 dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq); in snd_vx222_create()
136 return -EBUSY; in snd_vx222_create()
138 chip->irq = pci->irq; in snd_vx222_create()
139 card->sync_irq = chip->irq; in snd_vx222_create()
146 static int snd_vx222_probe(struct pci_dev *pci, in snd_vx222_probe()
149 static int dev; in snd_vx222_probe()
153 int err; in snd_vx222_probe()
156 return -ENODEV; in snd_vx222_probe()
159 return -ENOENT; in snd_vx222_probe()
162 err = snd_devm_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, in snd_vx222_probe()
167 switch ((int)pci_id->driver_data) { in snd_vx222_probe()
173 if (mic[dev]) in snd_vx222_probe()
182 card->private_data = vx; in snd_vx222_probe()
183 vx->core.ibl.size = ibl[dev]; in snd_vx222_probe()
185 sprintf(card->longname, "%s at 0x%lx & 0x%lx, irq %i", in snd_vx222_probe()
186 card->shortname, vx->port[0], vx->port[1], vx->core.irq); in snd_vx222_probe()
187 dev_dbg(card->dev, "%s at 0x%lx & 0x%lx, irq %i\n", in snd_vx222_probe()
188 card->shortname, vx->port[0], vx->port[1], vx->core.irq); in snd_vx222_probe()
191 vx->core.dev = &pci->dev; in snd_vx222_probe()
194 err = snd_vx_setup_firmware(&vx->core); in snd_vx222_probe()
207 static int snd_vx222_suspend(struct device *dev) in snd_vx222_suspend()
210 struct snd_vx222 *vx = card->private_data; in snd_vx222_suspend()
212 return snd_vx_suspend(&vx->core); in snd_vx222_suspend()
215 static int snd_vx222_resume(struct device *dev) in snd_vx222_resume()
218 struct snd_vx222 *vx = card->private_data; in snd_vx222_resume()
220 return snd_vx_resume(&vx->core); in snd_vx222_resume()