Lines Matching +full:mem +full:- +full:io

1 // SPDX-License-Identifier: GPL-2.0-or-later
16 * the following is a copy of the 2.4.18 OSS FREE file-heading comment:
21 * -- If MSND_CLASSIC is defined:
23 * -> driver for Turtle Beach Classic/Monterey/Tahiti
25 * -- Else
27 * -> driver for Turtle Beach Pinnacle/Fiji
29 * 12-3-2000 Modified IO port validation Steve Sycamore
45 #include <linux/io.h>
62 # define DEV_NAME "msnd-classic"
66 # define DEV_NAME "msnd-pinnacle"
71 chip->play_sample_size = snd_pcm_format_width(DEFSAMPLESIZE); in set_default_audio_parameters()
72 chip->play_sample_rate = DEFSAMPLERATE; in set_default_audio_parameters()
73 chip->play_channels = DEFCHANNELS; in set_default_audio_parameters()
74 chip->capture_sample_size = snd_pcm_format_width(DEFSAMPLESIZE); in set_default_audio_parameters()
75 chip->capture_sample_rate = DEFSAMPLERATE; in set_default_audio_parameters()
76 chip->capture_channels = DEFCHANNELS; in set_default_audio_parameters()
83 if (chip->banksPlayed < 3) in snd_msnd_eval_dsp_msg()
87 if (chip->last_playbank == LOBYTE(wMessage)) { in snd_msnd_eval_dsp_msg()
91 chip->banksPlayed++; in snd_msnd_eval_dsp_msg()
93 if (test_bit(F_WRITING, &chip->flags)) in snd_msnd_eval_dsp_msg()
96 chip->last_playbank = LOBYTE(wMessage); in snd_msnd_eval_dsp_msg()
97 chip->playDMAPos += chip->play_period_bytes; in snd_msnd_eval_dsp_msg()
98 if (chip->playDMAPos > chip->playLimit) in snd_msnd_eval_dsp_msg()
99 chip->playDMAPos = 0; in snd_msnd_eval_dsp_msg()
100 snd_pcm_period_elapsed(chip->playback_substream); in snd_msnd_eval_dsp_msg()
105 if (chip->last_recbank == LOBYTE(wMessage)) in snd_msnd_eval_dsp_msg()
107 chip->last_recbank = LOBYTE(wMessage); in snd_msnd_eval_dsp_msg()
108 chip->captureDMAPos += chip->capturePeriodBytes; in snd_msnd_eval_dsp_msg()
109 if (chip->captureDMAPos > (chip->captureLimit)) in snd_msnd_eval_dsp_msg()
110 chip->captureDMAPos = 0; in snd_msnd_eval_dsp_msg()
112 if (test_bit(F_READING, &chip->flags)) in snd_msnd_eval_dsp_msg()
113 snd_msnd_DARQ(chip, chip->last_recbank); in snd_msnd_eval_dsp_msg()
115 snd_pcm_period_elapsed(chip->capture_substream); in snd_msnd_eval_dsp_msg()
125 chip->banksPlayed); in snd_msnd_eval_dsp_msg()
126 if (chip->banksPlayed > 2) in snd_msnd_eval_dsp_msg()
127 clear_bit(F_WRITING, &chip->flags); in snd_msnd_eval_dsp_msg()
132 clear_bit(F_READING, &chip->flags); in snd_msnd_eval_dsp_msg()
144 if (chip->msndmidi_mpu) in snd_msnd_eval_dsp_msg()
145 snd_msndmidi_input_read(chip->msndmidi_mpu); in snd_msnd_eval_dsp_msg()
158 void __iomem *pwDSPQData = chip->mappedbase + DSPQ_DATA_BUFF; in snd_msnd_interrupt()
162 /* inb(chip->io + HP_RXL); */ in snd_msnd_interrupt()
165 head = readw(chip->DSPQ + JQS_wHead); in snd_msnd_interrupt()
166 tail = readw(chip->DSPQ + JQS_wTail); in snd_msnd_interrupt()
167 size = readw(chip->DSPQ + JQS_wSize); in snd_msnd_interrupt()
174 writew(head, chip->DSPQ + JQS_wHead); in snd_msnd_interrupt()
178 inb(chip->io + HP_RXL); in snd_msnd_interrupt()
183 static int snd_msnd_reset_dsp(long io, unsigned char *info) in snd_msnd_reset_dsp() argument
187 outb(HPDSPRESET_ON, io + HP_DSPR); in snd_msnd_reset_dsp()
191 *info = inb(io + HP_INFO); in snd_msnd_reset_dsp()
193 outb(HPDSPRESET_OFF, io + HP_DSPR); in snd_msnd_reset_dsp()
195 while (timeout-- > 0) { in snd_msnd_reset_dsp()
196 if (inb(io + HP_CVR) == HP_CVR_DEF) in snd_msnd_reset_dsp()
202 return -EIO; in snd_msnd_reset_dsp()
207 struct snd_msnd *chip = card->private_data; in snd_msnd_probe()
215 if (!request_region(chip->io, DSP_NUMIO, "probing")) { in snd_msnd_probe()
217 return -ENODEV; in snd_msnd_probe()
220 if (snd_msnd_reset_dsp(chip->io, &info) < 0) { in snd_msnd_probe()
221 release_region(chip->io, DSP_NUMIO); in snd_msnd_probe()
222 return -ENODEV; in snd_msnd_probe()
226 strcpy(card->shortname, "Classic/Tahiti/Monterey"); in snd_msnd_probe()
227 strcpy(card->longname, "Turtle Beach Multisound"); in snd_msnd_probe()
229 "I/O 0x%lx-0x%lx, IRQ %d, memory mapped to 0x%lX-0x%lX\n", in snd_msnd_probe()
230 card->shortname, in snd_msnd_probe()
231 chip->io, chip->io + DSP_NUMIO - 1, in snd_msnd_probe()
232 chip->irq, in snd_msnd_probe()
233 chip->base, chip->base + 0x7fff); in snd_msnd_probe()
256 strcpy(card->shortname, pin); in snd_msnd_probe()
260 strcpy(card->shortname, pin); in snd_msnd_probe()
264 strcpy(card->shortname, pin); in snd_msnd_probe()
268 strcpy(card->shortname, pin); in snd_msnd_probe()
272 strcpy(card->shortname, fiji); in snd_msnd_probe()
276 strcpy(card->shortname, fiji); in snd_msnd_probe()
280 strcpy(card->shortname, fiji); in snd_msnd_probe()
283 rev = "A-B (Fiji) or A-E (Pinnacle)"; in snd_msnd_probe()
284 strcpy(card->shortname, pinfiji); in snd_msnd_probe()
287 strcpy(card->longname, "Turtle Beach Multisound Pinnacle"); in snd_msnd_probe()
289 "I/O 0x%lx-0x%lx, IRQ %d, memory mapped to 0x%lX-0x%lX\n", in snd_msnd_probe()
290 card->shortname, in snd_msnd_probe()
292 chip->io, chip->io + DSP_NUMIO - 1, in snd_msnd_probe()
293 chip->irq, in snd_msnd_probe()
294 chip->base, chip->base + 0x7fff); in snd_msnd_probe()
297 release_region(chip->io, DSP_NUMIO); in snd_msnd_probe()
308 outb(chip->memid, chip->io + HP_MEMM); in snd_msnd_init_sma()
310 outb(HPBLKSEL_0, chip->io + HP_BLKS); in snd_msnd_init_sma()
312 chip->SMA = chip->mappedbase + SMA_STRUCT_START; in snd_msnd_init_sma()
315 mastVolLeft = readw(chip->SMA + SMA_wCurrMastVolLeft); in snd_msnd_init_sma()
316 mastVolRight = readw(chip->SMA + SMA_wCurrMastVolRight); in snd_msnd_init_sma()
319 memset_io(chip->mappedbase, 0, 0x8000); in snd_msnd_init_sma()
322 spin_lock_irqsave(&chip->lock, flags); in snd_msnd_init_sma()
323 outb(HPBLKSEL_1, chip->io + HP_BLKS); in snd_msnd_init_sma()
324 memset_io(chip->mappedbase, 0, 0x8000); in snd_msnd_init_sma()
325 outb(HPBLKSEL_0, chip->io + HP_BLKS); in snd_msnd_init_sma()
326 spin_unlock_irqrestore(&chip->lock, flags); in snd_msnd_init_sma()
329 chip->DAPQ = chip->mappedbase + DAPQ_OFFSET; in snd_msnd_init_sma()
330 snd_msnd_init_queue(chip->DAPQ, DAPQ_DATA_BUFF, DAPQ_BUFF_SIZE); in snd_msnd_init_sma()
333 chip->DARQ = chip->mappedbase + DARQ_OFFSET; in snd_msnd_init_sma()
334 snd_msnd_init_queue(chip->DARQ, DARQ_DATA_BUFF, DARQ_BUFF_SIZE); in snd_msnd_init_sma()
337 chip->MODQ = chip->mappedbase + MODQ_OFFSET; in snd_msnd_init_sma()
338 snd_msnd_init_queue(chip->MODQ, MODQ_DATA_BUFF, MODQ_BUFF_SIZE); in snd_msnd_init_sma()
341 chip->MIDQ = chip->mappedbase + MIDQ_OFFSET; in snd_msnd_init_sma()
342 snd_msnd_init_queue(chip->MIDQ, MIDQ_DATA_BUFF, MIDQ_BUFF_SIZE); in snd_msnd_init_sma()
344 /* DSP -> host message queue */ in snd_msnd_init_sma()
345 chip->DSPQ = chip->mappedbase + DSPQ_OFFSET; in snd_msnd_init_sma()
346 snd_msnd_init_queue(chip->DSPQ, DSPQ_DATA_BUFF, DSPQ_BUFF_SIZE); in snd_msnd_init_sma()
350 writew(1, chip->SMA + SMA_wCurrPlayFormat); in snd_msnd_init_sma()
351 writew(chip->play_sample_size, chip->SMA + SMA_wCurrPlaySampleSize); in snd_msnd_init_sma()
352 writew(chip->play_channels, chip->SMA + SMA_wCurrPlayChannels); in snd_msnd_init_sma()
353 writew(chip->play_sample_rate, chip->SMA + SMA_wCurrPlaySampleRate); in snd_msnd_init_sma()
355 writew(chip->play_sample_rate, chip->SMA + SMA_wCalFreqAtoD); in snd_msnd_init_sma()
356 writew(mastVolLeft, chip->SMA + SMA_wCurrMastVolLeft); in snd_msnd_init_sma()
357 writew(mastVolRight, chip->SMA + SMA_wCurrMastVolRight); in snd_msnd_init_sma()
359 writel(0x00010000, chip->SMA + SMA_dwCurrPlayPitch); in snd_msnd_init_sma()
360 writel(0x00000001, chip->SMA + SMA_dwCurrPlayRate); in snd_msnd_init_sma()
362 writew(0x303, chip->SMA + SMA_wCurrInputTagBits); in snd_msnd_init_sma()
372 struct snd_msnd *chip = card->private_data; in upload_dsp_code()
376 outb(HPBLKSEL_0, chip->io + HP_BLKS); in upload_dsp_code()
378 err = request_firmware(&init_fw, INITCODEFILE, card->dev); in upload_dsp_code()
383 err = request_firmware(&perm_fw, PERMCODEFILE, card->dev); in upload_dsp_code()
389 memcpy_toio(chip->mappedbase, perm_fw->data, perm_fw->size); in upload_dsp_code()
390 if (snd_msnd_upload_host(chip, init_fw->data, init_fw->size) < 0) { in upload_dsp_code()
392 err = -ENODEV; in upload_dsp_code()
408 outb(HPPRORESET_ON, chip->io + HP_PROR); in reset_proteus()
410 outb(HPPRORESET_OFF, chip->io + HP_PROR); in reset_proteus()
417 struct snd_msnd *chip = card->private_data; in snd_msnd_initialize()
421 outb(HPWAITSTATE_0, chip->io + HP_WAIT); in snd_msnd_initialize()
422 outb(HPBITMODE_16, chip->io + HP_BITM); in snd_msnd_initialize()
432 err = snd_msnd_reset_dsp(chip->io, NULL); in snd_msnd_initialize()
444 while (readw(chip->mappedbase)) { in snd_msnd_initialize()
446 if (!timeout--) { in snd_msnd_initialize()
448 return -EIO; in snd_msnd_initialize()
458 struct snd_msnd *chip = card->private_data; in snd_msnd_dsp_full_reset()
461 if (test_bit(F_RESETTING, &chip->flags) || ++chip->nresets > 10) in snd_msnd_dsp_full_reset()
464 set_bit(F_RESETTING, &chip->flags); in snd_msnd_dsp_full_reset()
471 clear_bit(F_RESETTING, &chip->flags); in snd_msnd_dsp_full_reset()
480 snd_msnd_dsp_full_reset(chip->card); in snd_msnd_send_dsp_cmd_chk()
487 writew(srate, chip->SMA + SMA_wCalFreqAtoD); in snd_msnd_calibrate_adc()
488 if (chip->calibrate_signal == 0) in snd_msnd_calibrate_adc()
489 writew(readw(chip->SMA + SMA_wCurrHostStatusFlags) in snd_msnd_calibrate_adc()
490 | 0x0001, chip->SMA + SMA_wCurrHostStatusFlags); in snd_msnd_calibrate_adc()
492 writew(readw(chip->SMA + SMA_wCurrHostStatusFlags) in snd_msnd_calibrate_adc()
493 & ~0x0001, chip->SMA + SMA_wCurrHostStatusFlags); in snd_msnd_calibrate_adc()
500 return -EIO; in snd_msnd_calibrate_adc()
508 snd_msnd_enable_irq(mpu->private_data); in snd_msnd_mpu401_open()
509 snd_msnd_send_dsp_cmd(mpu->private_data, HDEX_MIDI_IN_START); in snd_msnd_mpu401_open()
515 snd_msnd_send_dsp_cmd(mpu->private_data, HDEX_MIDI_IN_STOP); in snd_msnd_mpu401_close()
516 snd_msnd_disable_irq(mpu->private_data); in snd_msnd_mpu401_close()
524 struct snd_msnd *chip = card->private_data; in snd_msnd_attach()
527 err = devm_request_irq(card->dev, chip->irq, snd_msnd_interrupt, 0, in snd_msnd_attach()
528 card->shortname, chip); in snd_msnd_attach()
530 printk(KERN_ERR LOGNAME ": Couldn't grab IRQ %d\n", chip->irq); in snd_msnd_attach()
533 card->sync_irq = chip->irq; in snd_msnd_attach()
534 if (!devm_request_region(card->dev, chip->io, DSP_NUMIO, in snd_msnd_attach()
535 card->shortname)) in snd_msnd_attach()
536 return -EBUSY; in snd_msnd_attach()
538 if (!devm_request_mem_region(card->dev, chip->base, BUFFSIZE, in snd_msnd_attach()
539 card->shortname)) { in snd_msnd_attach()
541 ": unable to grab memory region 0x%lx-0x%lx\n", in snd_msnd_attach()
542 chip->base, chip->base + BUFFSIZE - 1); in snd_msnd_attach()
543 return -EBUSY; in snd_msnd_attach()
545 chip->mappedbase = devm_ioremap(card->dev, chip->base, 0x8000); in snd_msnd_attach()
546 if (!chip->mappedbase) { in snd_msnd_attach()
548 ": unable to map memory region 0x%lx-0x%lx\n", in snd_msnd_attach()
549 chip->base, chip->base + BUFFSIZE - 1); in snd_msnd_attach()
550 return -EIO; in snd_msnd_attach()
578 &chip->rmidi); in snd_msnd_attach()
584 mpu = chip->rmidi->private_data; in snd_msnd_attach()
586 mpu->open_input = snd_msnd_mpu401_open; in snd_msnd_attach()
587 mpu->close_input = snd_msnd_mpu401_close; in snd_msnd_attach()
588 mpu->private_data = chip; in snd_msnd_attach()
591 disable_irq(chip->irq); in snd_msnd_attach()
592 snd_msnd_calibrate_adc(chip, chip->play_sample_rate); in snd_msnd_attach()
613 return -EIO; in snd_msnd_write_cfg()
618 static int snd_msnd_write_cfg_io0(int cfg, int num, u16 io) in snd_msnd_write_cfg_io0() argument
621 return -EIO; in snd_msnd_write_cfg_io0()
622 if (snd_msnd_write_cfg(cfg, IREG_IO0_BASEHI, HIBYTE(io))) in snd_msnd_write_cfg_io0()
623 return -EIO; in snd_msnd_write_cfg_io0()
624 if (snd_msnd_write_cfg(cfg, IREG_IO0_BASELO, LOBYTE(io))) in snd_msnd_write_cfg_io0()
625 return -EIO; in snd_msnd_write_cfg_io0()
629 static int snd_msnd_write_cfg_io1(int cfg, int num, u16 io) in snd_msnd_write_cfg_io1() argument
632 return -EIO; in snd_msnd_write_cfg_io1()
633 if (snd_msnd_write_cfg(cfg, IREG_IO1_BASEHI, HIBYTE(io))) in snd_msnd_write_cfg_io1()
634 return -EIO; in snd_msnd_write_cfg_io1()
635 if (snd_msnd_write_cfg(cfg, IREG_IO1_BASELO, LOBYTE(io))) in snd_msnd_write_cfg_io1()
636 return -EIO; in snd_msnd_write_cfg_io1()
643 return -EIO; in snd_msnd_write_cfg_irq()
645 return -EIO; in snd_msnd_write_cfg_irq()
647 return -EIO; in snd_msnd_write_cfg_irq()
651 static int snd_msnd_write_cfg_mem(int cfg, int num, int mem) in snd_msnd_write_cfg_mem() argument
655 mem >>= 8; in snd_msnd_write_cfg_mem()
656 wmem = (u16)(mem & 0xfff); in snd_msnd_write_cfg_mem()
658 return -EIO; in snd_msnd_write_cfg_mem()
660 return -EIO; in snd_msnd_write_cfg_mem()
662 return -EIO; in snd_msnd_write_cfg_mem()
665 return -EIO; in snd_msnd_write_cfg_mem()
672 return -EIO; in snd_msnd_activate_logical()
674 return -EIO; in snd_msnd_activate_logical()
679 u16 io1, u16 irq, int mem) in snd_msnd_write_cfg_logical() argument
682 return -EIO; in snd_msnd_write_cfg_logical()
684 return -EIO; in snd_msnd_write_cfg_logical()
686 return -EIO; in snd_msnd_write_cfg_logical()
688 return -EIO; in snd_msnd_write_cfg_logical()
689 if (snd_msnd_write_cfg_mem(cfg, num, mem)) in snd_msnd_write_cfg_logical()
690 return -EIO; in snd_msnd_write_cfg_logical()
692 return -EIO; in snd_msnd_write_cfg_logical()
704 return -EIO; in snd_msnd_pinnacle_cfg_reset()
710 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
718 static long io[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; variable
720 static long mem[SNDRV_CARDS] = SNDRV_DEFAULT_PORT; variable
738 static int write_ndelay[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 1 };
757 module_param_hw_array(io, long, ioport, NULL, 0444);
758 MODULE_PARM_DESC(io, "IO port #");
760 module_param_hw_array(mem, long, iomem, NULL, 0444);
778 if (io[i] == SNDRV_AUTO_PORT) in snd_msnd_isa_match()
781 if (irq[i] == SNDRV_AUTO_PORT || mem[i] == SNDRV_AUTO_PORT) { in snd_msnd_isa_match()
782 printk(KERN_WARNING LOGNAME ": io, irq and mem must be set\n"); in snd_msnd_isa_match()
787 if (!(io[i] == 0x290 || in snd_msnd_isa_match()
788 io[i] == 0x260 || in snd_msnd_isa_match()
789 io[i] == 0x250 || in snd_msnd_isa_match()
790 io[i] == 0x240 || in snd_msnd_isa_match()
791 io[i] == 0x230 || in snd_msnd_isa_match()
792 io[i] == 0x220 || in snd_msnd_isa_match()
793 io[i] == 0x210 || in snd_msnd_isa_match()
794 io[i] == 0x3e0)) { in snd_msnd_isa_match()
795 printk(KERN_ERR LOGNAME ": \"io\" - DSP I/O base must be set " in snd_msnd_isa_match()
801 if (io[i] < 0x100 || io[i] > 0x3e0 || (io[i] % 0x10) != 0) { in snd_msnd_isa_match()
803 ": \"io\" - DSP I/O base must within the range 0x100 " in snd_msnd_isa_match()
816 ": \"irq\" - must be set to 5, 7, 9, 10, 11 or 12\n"); in snd_msnd_isa_match()
820 if (!(mem[i] == 0xb0000 || in snd_msnd_isa_match()
821 mem[i] == 0xc8000 || in snd_msnd_isa_match()
822 mem[i] == 0xd0000 || in snd_msnd_isa_match()
823 mem[i] == 0xd8000 || in snd_msnd_isa_match()
824 mem[i] == 0xe0000 || in snd_msnd_isa_match()
825 mem[i] == 0xe8000)) { in snd_msnd_isa_match()
826 printk(KERN_ERR LOGNAME ": \"mem\" - must be set to " in snd_msnd_isa_match()
858 return -ENODEV; in snd_msnd_isa_probe()
866 chip = card->private_data; in snd_msnd_isa_probe()
867 chip->card = card; in snd_msnd_isa_probe()
872 chip->irqid = HPIRQ_5; break; in snd_msnd_isa_probe()
874 chip->irqid = HPIRQ_7; break; in snd_msnd_isa_probe()
876 chip->irqid = HPIRQ_9; break; in snd_msnd_isa_probe()
878 chip->irqid = HPIRQ_10; break; in snd_msnd_isa_probe()
880 chip->irqid = HPIRQ_11; break; in snd_msnd_isa_probe()
882 chip->irqid = HPIRQ_12; break; in snd_msnd_isa_probe()
885 switch (mem[idx]) { in snd_msnd_isa_probe()
887 chip->memid = HPMEM_B000; break; in snd_msnd_isa_probe()
889 chip->memid = HPMEM_C800; break; in snd_msnd_isa_probe()
891 chip->memid = HPMEM_D000; break; in snd_msnd_isa_probe()
893 chip->memid = HPMEM_D800; break; in snd_msnd_isa_probe()
895 chip->memid = HPMEM_E000; break; in snd_msnd_isa_probe()
897 chip->memid = HPMEM_E800; break; in snd_msnd_isa_probe()
900 printk(KERN_INFO LOGNAME ": Non-PnP mode: configuring at port 0x%lx\n", in snd_msnd_isa_probe()
903 if (!devm_request_region(card->dev, cfg[idx], 2, in snd_msnd_isa_probe()
907 return -EIO; in snd_msnd_isa_probe()
911 return -EIO; in snd_msnd_isa_probe()
915 io[idx], 0, in snd_msnd_isa_probe()
916 irq[idx], mem[idx]); in snd_msnd_isa_probe()
969 chip->type = msndClassic; in snd_msnd_isa_probe()
971 chip->type = msndPinnacle; in snd_msnd_isa_probe()
973 chip->io = io[idx]; in snd_msnd_isa_probe()
974 chip->irq = irq[idx]; in snd_msnd_isa_probe()
975 chip->base = mem[idx]; in snd_msnd_isa_probe()
977 chip->calibrate_signal = calibrate_signal ? 1 : 0; in snd_msnd_isa_probe()
978 chip->recsrc = 0; in snd_msnd_isa_probe()
979 chip->dspq_data_buff = DSPQ_DATA_BUFF; in snd_msnd_isa_probe()
980 chip->dspq_buff_size = DSPQ_BUFF_SIZE; in snd_msnd_isa_probe()
982 clear_bit(F_DISABLE_WRITE_NDELAY, &chip->flags); in snd_msnd_isa_probe()
984 set_bit(F_DISABLE_WRITE_NDELAY, &chip->flags); in snd_msnd_isa_probe()
987 set_bit(F_HAVEDIGITAL, &chip->flags); in snd_msnd_isa_probe()
989 spin_lock_init(&chip->lock); in snd_msnd_isa_probe()
1031 return -ENODEV; in snd_msnd_pnp_detect()
1036 pnp_dev = pnp_request_card_device(pcard, pid->devs[0].id, NULL); in snd_msnd_pnp_detect()
1038 return -ENODEV; in snd_msnd_pnp_detect()
1040 mpu_dev = pnp_request_card_device(pcard, pid->devs[1].id, NULL); in snd_msnd_pnp_detect()
1042 return -ENODEV; in snd_msnd_pnp_detect()
1046 return -EBUSY; in snd_msnd_pnp_detect()
1051 return -EBUSY; in snd_msnd_pnp_detect()
1058 ret = snd_devm_card_new(&pcard->card->dev, in snd_msnd_pnp_detect()
1064 chip = card->private_data; in snd_msnd_pnp_detect()
1065 chip->card = card; in snd_msnd_pnp_detect()
1070 io[idx] = pnp_port_start(pnp_dev, 0); in snd_msnd_pnp_detect()
1072 mem[idx] = pnp_mem_start(pnp_dev, 0); in snd_msnd_pnp_detect()
1078 chip->type = msndClassic; in snd_msnd_pnp_detect()
1080 chip->type = msndPinnacle; in snd_msnd_pnp_detect()
1082 chip->io = io[idx]; in snd_msnd_pnp_detect()
1083 chip->irq = irq[idx]; in snd_msnd_pnp_detect()
1084 chip->base = mem[idx]; in snd_msnd_pnp_detect()
1086 chip->calibrate_signal = calibrate_signal ? 1 : 0; in snd_msnd_pnp_detect()
1087 chip->recsrc = 0; in snd_msnd_pnp_detect()
1088 chip->dspq_data_buff = DSPQ_DATA_BUFF; in snd_msnd_pnp_detect()
1089 chip->dspq_buff_size = DSPQ_BUFF_SIZE; in snd_msnd_pnp_detect()
1091 clear_bit(F_DISABLE_WRITE_NDELAY, &chip->flags); in snd_msnd_pnp_detect()
1093 set_bit(F_DISABLE_WRITE_NDELAY, &chip->flags); in snd_msnd_pnp_detect()
1096 set_bit(F_HAVEDIGITAL, &chip->flags); in snd_msnd_pnp_detect()
1098 spin_lock_init(&chip->lock); in snd_msnd_pnp_detect()