sb8.c (29651) | sb8.c (30869) |
---|---|
1/* 2 * sound/sb_dsp.c 3 * 4 * driver for the SoundBlaster and clones. 5 * 6 * Copyright 1997 Luigi Rizzo. 7 * 8 * Derived from files in the Voxware 3.5 distribution, 9 * Copyright by Hannu Savolainen 1994, under the same copyright 10 * conditions. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions | 1/* 2 * sound/sb_dsp.c 3 * 4 * driver for the SoundBlaster and clones. 5 * 6 * Copyright 1997 Luigi Rizzo. 7 * 8 * Derived from files in the Voxware 3.5 distribution, 9 * Copyright by Hannu Savolainen 1994, under the same copyright 10 * conditions. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions |
14 * are met: 1. Redistributions of source code must retain the above 15 * copyright notice, this list of conditions and the following 16 * disclaimer. 2. Redistributions in binary form must reproduce the 17 * above copyright notice, this list of conditions and the following 18 * disclaimer in the documentation and/or other materials provided 19 * with the distribution. 20 * | 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright 16 * notice, this list of conditions and the following disclaimer. 17 * 2. Redistributions in binary form must reproduce the above copyright 18 * notice, this list of conditions and the following disclaimer in 19 * the documentation and/or other materials provided with the 20 * distribution. 21 * |
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' 22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 23 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 24 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 25 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 28 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED --- 78 unchanged lines hidden (view full) --- 107 * directly referenced in the descriptor. 108 */ 109 110/* 111 * the probe routine for the SoundBlaster only consists in 112 * resetting the dsp and testing if it is there. 113 * Version detection etc. will be done at attach time. 114 * | 22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' 23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 24 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 25 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 26 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 29 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED --- 78 unchanged lines hidden (view full) --- 108 * directly referenced in the descriptor. 109 */ 110 111/* 112 * the probe routine for the SoundBlaster only consists in 113 * resetting the dsp and testing if it is there. 114 * Version detection etc. will be done at attach time. 115 * |
115 * Remebber, isa probe routines are supposed to return the | 116 * Remember, ISA probe routines are supposed to return the |
116 * size of io space used. 117 */ 118 119static int 120sb_probe(struct isa_device *dev) 121{ 122 bzero(&pcm_info[dev->id_unit], sizeof(pcm_info[dev->id_unit]) ); 123 if (dev->id_iobase == -1) { --- 11 unchanged lines hidden (view full) --- 135 return 0; 136} 137 138static int 139sb_attach(struct isa_device *dev) 140{ 141 snddev_info *d = &pcm_info[dev->id_unit] ; 142 | 117 * size of io space used. 118 */ 119 120static int 121sb_probe(struct isa_device *dev) 122{ 123 bzero(&pcm_info[dev->id_unit], sizeof(pcm_info[dev->id_unit]) ); 124 if (dev->id_iobase == -1) { --- 11 unchanged lines hidden (view full) --- 136 return 0; 137} 138 139static int 140sb_attach(struct isa_device *dev) 141{ 142 snddev_info *d = &pcm_info[dev->id_unit] ; 143 |
144 dev->id_alive = 16 ; /* number of io ports */ 145 /* should be already set but just in case... */ |
|
143 sb_dsp_init(d, dev); 144 return 0 ; 145} 146 147/* 148 * here are the main routines from the switches. 149 */ 150 --- 15 unchanged lines hidden (view full) --- 166 } 167 168 d->wsel.si_pid = 0; 169 d->wsel.si_flags = 0; 170 171 d->rsel.si_pid = 0; 172 d->rsel.si_flags = 0; 173 | 146 sb_dsp_init(d, dev); 147 return 0 ; 148} 149 150/* 151 * here are the main routines from the switches. 152 */ 153 --- 15 unchanged lines hidden (view full) --- 169 } 170 171 d->wsel.si_pid = 0; 172 d->wsel.si_flags = 0; 173 174 d->rsel.si_pid = 0; 175 d->rsel.si_flags = 0; 176 |
174 d->esel.si_pid = 0; 175 d->esel.si_flags = 0; 176 | |
177 d->flags = 0 ; 178 d->bd_flags &= ~BD_F_HISPEED ; 179 180 switch ( dev & 0xf ) { 181 case SND_DEV_DSP16 : 182 if ((d->audio_fmt & AFMT_S16_LE) == 0) { 183 printf("sorry, 16-bit not supported on SB %d.%02d\n", 184 (d->bd_id >>8) & 0xff, d->bd_id & 0xff); --- 10 unchanged lines hidden (view full) --- 195 } 196 197 d->flags |= SND_F_BUSY ; 198 d->play_speed = d->rec_speed = DSP_DEFAULT_SPEED ; 199 200 if (flags & O_NONBLOCK) 201 d->flags |= SND_F_NBIO ; 202 | 177 d->flags = 0 ; 178 d->bd_flags &= ~BD_F_HISPEED ; 179 180 switch ( dev & 0xf ) { 181 case SND_DEV_DSP16 : 182 if ((d->audio_fmt & AFMT_S16_LE) == 0) { 183 printf("sorry, 16-bit not supported on SB %d.%02d\n", 184 (d->bd_id >>8) & 0xff, d->bd_id & 0xff); --- 10 unchanged lines hidden (view full) --- 195 } 196 197 d->flags |= SND_F_BUSY ; 198 d->play_speed = d->rec_speed = DSP_DEFAULT_SPEED ; 199 200 if (flags & O_NONBLOCK) 201 d->flags |= SND_F_NBIO ; 202 |
203 reset_dbuf(& (d->dbuf_in) ); 204 reset_dbuf(& (d->dbuf_out) ); | |
205 sb_reset_dsp(d->io_base); 206 ask_init(d); 207 208 return 0; 209} 210 211static int 212sb_dsp_close(dev_t dev, int flags, int mode, struct proc * p) --- 69 unchanged lines hidden (view full) --- 282 } 283 if ( c & 2 ) { /* 16-bit dma */ 284 if (d->dma1 >= 4) 285 reason |= 1; 286 if (d->dma2 >= 4) 287 reason |= 2; 288 } 289 } | 203 sb_reset_dsp(d->io_base); 204 ask_init(d); 205 206 return 0; 207} 208 209static int 210sb_dsp_close(dev_t dev, int flags, int mode, struct proc * p) --- 69 unchanged lines hidden (view full) --- 280 } 281 if ( c & 2 ) { /* 16-bit dma */ 282 if (d->dma1 >= 4) 283 reason |= 1; 284 if (d->dma2 >= 4) 285 reason |= 2; 286 } 287 } |
288 /* XXX previous location of ack... */ 289 DEB(printf("sbintr, flags 0x%08lx reason %d\n", d->flags, reason)); 290 if ( d->dbuf_out.dl && (reason & 1) ) 291 dsp_wrintr(d); 292 if ( d->dbuf_in.dl && (reason & 2) ) 293 dsp_rdintr(d); 294 |
|
290 if ( c & 2 ) 291 inb(DSP_DATA_AVL16); /* 16-bit int ack */ 292 if (c & 1) 293 inb(DSP_DATA_AVAIL); /* 8-bit int ack */ 294 | 295 if ( c & 2 ) 296 inb(DSP_DATA_AVL16); /* 16-bit int ack */ 297 if (c & 1) 298 inb(DSP_DATA_AVAIL); /* 8-bit int ack */ 299 |
295DEB(printf("sbintr, flags 0x%08lx reason %d\n", d->flags, reason)); 296 if ( (d->flags & SND_F_WR_DMA) && (reason & 1) ) 297 dsp_wrintr(d); 298 if ( (d->flags & SND_F_RD_DMA) && (reason & 2) ) 299 dsp_rdintr(d); 300 | |
301 /* 302 * the sb16 might have multiple sources etc. 303 */ 304 if (d->bd_flags & BD_F_SB16 && (c & 3) ) 305 goto again; 306} 307 308/* --- 6 unchanged lines hidden (view full) --- 315 * the changes at the next convenient time (typically, at the 316 * start of operations). For full duplex devices, in some cases the 317 * init requires both channels to be idle. 318 */ 319static int 320sb_callback(snddev_info *d, int reason) 321{ 322 int rd = reason & SND_CB_RD ; | 300 /* 301 * the sb16 might have multiple sources etc. 302 */ 303 if (d->bd_flags & BD_F_SB16 && (c & 3) ) 304 goto again; 305} 306 307/* --- 6 unchanged lines hidden (view full) --- 314 * the changes at the next convenient time (typically, at the 315 * start of operations). For full duplex devices, in some cases the 316 * init requires both channels to be idle. 317 */ 318static int 319sb_callback(snddev_info *d, int reason) 320{ 321 int rd = reason & SND_CB_RD ; |
323 int l = (rd) ? d->dbuf_in.dl0 : d->dbuf_out.dl0 ; | 322 int l = (rd) ? d->dbuf_in.dl : d->dbuf_out.dl ; |
324 325 switch (reason & SND_CB_REASON_MASK) { 326 case SND_CB_INIT : /* called with int enabled and no pending io */ 327 dsp_speed(d); 328 snd_set_blocksize(d); 329 if (d->play_fmt & AFMT_MU_LAW) 330 d->flags |= SND_F_XLAT8 ; 331 else 332 d->flags &= ~SND_F_XLAT8 ; | 323 324 switch (reason & SND_CB_REASON_MASK) { 325 case SND_CB_INIT : /* called with int enabled and no pending io */ 326 dsp_speed(d); 327 snd_set_blocksize(d); 328 if (d->play_fmt & AFMT_MU_LAW) 329 d->flags |= SND_F_XLAT8 ; 330 else 331 d->flags &= ~SND_F_XLAT8 ; |
332 reset_dbuf(& (d->dbuf_in), SND_CHAN_RD ); 333 reset_dbuf(& (d->dbuf_out), SND_CHAN_WR ); |
|
333 return 1; | 334 return 1; |
334 break ; | 335 break; |
335 336 case SND_CB_START : /* called with int disabled */ | 336 337 case SND_CB_START : /* called with int disabled */ |
337 sb_cmd(d->io_base, rd ? DSP_CMD_SPKOFF : DSP_CMD_SPKON); 338 d->flags &= ~SND_F_INIT ; | |
339 if (d->bd_flags & BD_F_SB16) { 340 /* the SB16 can do full duplex using one 16-bit channel 341 * and one 8-bit channel. It needs to be programmed to 342 * use split format though. | 338 if (d->bd_flags & BD_F_SB16) { 339 /* the SB16 can do full duplex using one 16-bit channel 340 * and one 8-bit channel. It needs to be programmed to 341 * use split format though. |
342 * We use the following algorithm: 343 * 1. check which direction(s) are active; 344 * 2. check if we should swap dma channels 345 * 3. check if we can do the swap. |
|
343 */ | 346 */ |
344 int b16 ; 345 int swap = 0 ; | 347 int swap = 1 ; /* default... */ |
346 | 348 |
347 b16 = (rd) ? d->rec_fmt : d->play_fmt ; 348 b16 = (b16 == AFMT_S16_LE) ? 1 : 0; 349 /* 350 * check if I have to swap dma channels. Swap if 351 * - !rd, dma1 <4, b16 352 * - !rd, dma1 >=4, !b16 353 * - rd, dma2 <4, b16 354 * - rd, dma2 >=4, !b16 355 */ 356 if (!rd) { 357 if ( (d->dma1 <4 && b16) || (d->dma1 >=4 && !b16) ) swap = 1; | 349 if (rd) { 350 if (d->flags & SND_F_WRITING || d->dbuf_out.dl) 351 swap = 0; 352 if (d->rec_fmt == AFMT_S16_LE && d->dma2 >=4) 353 swap = 0; 354 if (d->rec_fmt != AFMT_S16_LE && d->dma2 <4) 355 swap = 0; |
358 } else { | 356 } else { |
359 if ( (d->dma2 <4 && b16) || (d->dma2 >=4 && !b16) ) swap = 1; | 357 if (d->flags & SND_F_READING || d->dbuf_in.dl) 358 swap = 0; 359 if (d->play_fmt == AFMT_S16_LE && d->dma1 >=4) 360 swap = 0; 361 if (d->play_fmt != AFMT_S16_LE && d->dma1 <4) 362 swap = 0; |
360 } | 363 } |
361 /* 362 * before swapping should make sure that there is no 363 * pending DMA on the other channel... 364 */ | 364 |
365 if (swap) { 366 int c = d->dma2 ; 367 d->dma2 = d->dma1; 368 d->dma1 = c ; | 365 if (swap) { 366 int c = d->dma2 ; 367 d->dma2 = d->dma1; 368 d->dma1 = c ; |
369 reset_dbuf(& (d->dbuf_in), SND_CHAN_RD ); 370 reset_dbuf(& (d->dbuf_out), SND_CHAN_WR ); 371 DEB(printf("START dma chan: play %d, rec %d\n", 372 d->dma1, d->dma2)); |
|
369 } | 373 } |
370 DEB(printf("sb_init: play %ld rec %ld dma1 %d dma2 %d\n", 371 d->play_fmt, d->rec_fmt, d->dma1, d->dma2)); | |
372 } | 374 } |
373 /* fallthrough */ 374 case SND_CB_RESTART: | 375 if (!rd) 376 sb_cmd(d->io_base, DSP_CMD_SPKON); 377 |
375 if (d->bd_flags & BD_F_SB16) { 376 u_char c, c1 ; | 378 if (d->bd_flags & BD_F_SB16) { 379 u_char c, c1 ; |
377 /* 378 * SB16 support still not completely working!!! 379 * 380 * in principle, on the SB16, I could support simultaneous 381 * play & rec. 382 * However, there is no way to ask explicitly for 8 or 383 * 16 bit transfer. As a consequence, if we do 8-bit, 384 * we need to use the 8-bit channel, and if we do 16-bit, 385 * we need to use the other one. The only way I find to 386 * do this is to swap d->dma1 and d->dma2 ... 387 * 388 */ | |
389 390 if (rd) { 391 c = ((d->dma2 > 3) ? DSP_DMA16 : DSP_DMA8) | | 380 381 if (rd) { 382 c = ((d->dma2 > 3) ? DSP_DMA16 : DSP_DMA8) | |
383 DSP_F16_AUTO | |
|
392 DSP_F16_FIFO_ON | DSP_F16_ADC ; | 384 DSP_F16_FIFO_ON | DSP_F16_ADC ; |
393 c1 = (d->play_fmt == AFMT_U8) ? 0 : DSP_F16_SIGNED ; 394 if (d->play_fmt == AFMT_MU_LAW) c1 = 0 ; | 385 c1 = (d->rec_fmt == AFMT_U8) ? 0 : DSP_F16_SIGNED ; 386 if (d->rec_fmt == AFMT_MU_LAW) c1 = 0 ; |
395 if (d->rec_fmt == AFMT_S16_LE) 396 l /= 2 ; 397 } else { 398 c = ((d->dma1 > 3) ? DSP_DMA16 : DSP_DMA8) | | 387 if (d->rec_fmt == AFMT_S16_LE) 388 l /= 2 ; 389 } else { 390 c = ((d->dma1 > 3) ? DSP_DMA16 : DSP_DMA8) | |
391 DSP_F16_AUTO | |
|
399 DSP_F16_FIFO_ON | DSP_F16_DAC ; | 392 DSP_F16_FIFO_ON | DSP_F16_DAC ; |
400 c1 = (d->rec_fmt == AFMT_U8) ? 0 : DSP_F16_SIGNED ; | 393 c1 = (d->play_fmt == AFMT_U8) ? 0 : DSP_F16_SIGNED ; |
401 if (d->play_fmt == AFMT_MU_LAW) c1 = 0 ; 402 if (d->play_fmt == AFMT_S16_LE) 403 l /= 2 ; 404 } 405 406 if (d->flags & SND_F_STEREO) 407 c1 |= DSP_F16_STEREO ; 408 409 sb_cmd(d->io_base, c ); 410 sb_cmd3(d->io_base, c1 , l - 1) ; 411 } else { | 394 if (d->play_fmt == AFMT_MU_LAW) c1 = 0 ; 395 if (d->play_fmt == AFMT_S16_LE) 396 l /= 2 ; 397 } 398 399 if (d->flags & SND_F_STEREO) 400 c1 |= DSP_F16_STEREO ; 401 402 sb_cmd(d->io_base, c ); 403 sb_cmd3(d->io_base, c1 , l - 1) ; 404 } else { |
405 /* code for the SB2 and SB3 */ |
|
412 u_char c ; 413 if (d->bd_flags & BD_F_HISPEED) | 406 u_char c ; 407 if (d->bd_flags & BD_F_HISPEED) |
414 c = (rd) ? DSP_CMD_HSADC : DSP_CMD_HSDAC ; | 408 c = (rd) ? DSP_CMD_HSADC_AUTO : DSP_CMD_HSDAC_AUTO ; |
415 else | 409 else |
416 c = (rd) ? DSP_CMD_ADC8 : DSP_CMD_DAC8 ; | 410 c = (rd) ? DSP_CMD_ADC8_AUTO : DSP_CMD_DAC8_AUTO ; |
417 sb_cmd3(d->io_base, c , l - 1) ; 418 } 419 break; 420 | 411 sb_cmd3(d->io_base, c , l - 1) ; 412 } 413 break; 414 |
415 case SND_CB_ABORT : /* XXX */ |
|
421 case SND_CB_STOP : | 416 case SND_CB_STOP : |
422 /* XXX ??? sb_cmd(d->io_base, DSP_CMD_SPKOFF);*/ /* speaker off */ | 417 { 418 int cmd = DSP_CMD_DMAPAUSE_8 ; /* default: halt 8 bit chan */ 419 if (d->bd_flags & BD_F_SB16) { 420 if ( (rd && d->dbuf_in.chan>4) || (!rd && d->dbuf_out.chan>4) ) 421 cmd = DSP_CMD_DMAPAUSE_16 ; 422 } 423 if (d->bd_flags & BD_F_HISPEED) { 424 sb_reset_dsp(d->io_base); 425 d->flags |= SND_F_INIT ; 426 } else { 427 sb_cmd(d->io_base, cmd); /* pause dma. */ 428 /* 429 * This seems to have the side effect of blocking the other 430 * side as well so I have to re-enable it :( 431 */ 432 if ( (rd && d->dbuf_out.dl) || 433 (!rd && d->dbuf_in.dl) ) 434 sb_cmd(d->io_base, cmd == DSP_CMD_DMAPAUSE_8 ? 435 0xd6 : 0xd4); /* continue other dma */ 436 } 437 } 438 DEB( sb_cmd(d->io_base, DSP_CMD_SPKOFF) ); /* speaker off */ |
423 break ; 424 425 } 426 return 0 ; 427} 428 429/* 430 * The second part of the file contains all functions specific to --- 7 unchanged lines hidden (view full) --- 438 439 outb(DSP_RESET, 1); 440 DELAY(100); 441 outb(DSP_RESET, 0); 442 for (loopc = 0; loopc<100 && !(inb(DSP_DATA_AVAIL) & 0x80); loopc++) 443 DELAY(30); 444 445 if (inb(DSP_READ) != 0xAA) { | 439 break ; 440 441 } 442 return 0 ; 443} 444 445/* 446 * The second part of the file contains all functions specific to --- 7 unchanged lines hidden (view full) --- 454 455 outb(DSP_RESET, 1); 456 DELAY(100); 457 outb(DSP_RESET, 0); 458 for (loopc = 0; loopc<100 && !(inb(DSP_DATA_AVAIL) & 0x80); loopc++) 459 DELAY(30); 460 461 if (inb(DSP_READ) != 0xAA) { |
446 DEB(printf("sb_reset_dsp failed\n")); | 462 DEB(printf("sb_reset_dsp 0x%x failed\n", io_base)); |
447 return 0; /* Sorry */ 448 } 449 return 1; 450} 451 452/* 453 * only used in sb_attach from here. 454 */ --- 293 unchanged lines hidden (view full) --- 748 749 if (d->flags & SND_F_STEREO) 750 speed *= 2; 751 752 /* 753 * Now the speed should be valid. Compute the value to be 754 * programmed into the board. 755 * | 463 return 0; /* Sorry */ 464 } 465 return 1; 466} 467 468/* 469 * only used in sb_attach from here. 470 */ --- 293 unchanged lines hidden (view full) --- 764 765 if (d->flags & SND_F_STEREO) 766 speed *= 2; 767 768 /* 769 * Now the speed should be valid. Compute the value to be 770 * programmed into the board. 771 * |
756 * XXX check this code... | 772 * XXX stereo init is still missing... |
757 */ 758 759 if (speed > 22050) { /* High speed mode on 2.01/3.xx */ 760 int tmp; 761 | 773 */ 774 775 if (speed > 22050) { /* High speed mode on 2.01/3.xx */ 776 int tmp; 777 |
762 tconst = (u_char) ((65536 - ((256000000 + speed / 2) / speed)) >> 8); | 778 tconst = (u_char) ((65536 - ((256000000 + speed / 2) / speed)) >> 8) ; |
763 d->bd_flags |= BD_F_HISPEED ; 764 765 flags = spltty(); 766 sb_cmd2(d->io_base, DSP_CMD_TCONST, tconst); 767 splx(flags); 768 769 tmp = 65536 - (tconst << 8); 770 speed = (256000000 + tmp / 2) / tmp; --- 246 unchanged lines hidden (view full) --- 1017 &tty_imask /* imask */ 1018}; 1019DATA_SET (pnpdevice_set, sb16pnp); 1020 1021static char * 1022sb16pnp_probe(u_long csn, u_long vend_id) 1023{ 1024 char *s = NULL ; | 779 d->bd_flags |= BD_F_HISPEED ; 780 781 flags = spltty(); 782 sb_cmd2(d->io_base, DSP_CMD_TCONST, tconst); 783 splx(flags); 784 785 tmp = 65536 - (tconst << 8); 786 speed = (256000000 + tmp / 2) / tmp; --- 246 unchanged lines hidden (view full) --- 1033 &tty_imask /* imask */ 1034}; 1035DATA_SET (pnpdevice_set, sb16pnp); 1036 1037static char * 1038sb16pnp_probe(u_long csn, u_long vend_id) 1039{ 1040 char *s = NULL ; |
1025 if (vend_id == 0x01009305) 1026 s = "Avance Asound 100" ; 1027 if (vend_id == 0x2b008c0e) 1028 s = "SB16 Value PnP" ; | 1041 |
1029 /* | 1042 /* |
1030 * The SB16/AWE64 cards seem to differ in the fourth byte of | 1043 * The SB16/AWExx cards seem to differ in the fourth byte of |
1031 * the vendor id, so I have just masked it for the time being... 1032 * Reported values are: 1033 * SB16 Value PnP: 0x2b008c0e 1034 * SB AWE64 PnP: 0x39008c0e 0x9d008c0e 0xc3008c0e 1035 */ 1036 if ( (vend_id & 0xffffff) == (0x9d008c0e & 0xffffff) ) | 1044 * the vendor id, so I have just masked it for the time being... 1045 * Reported values are: 1046 * SB16 Value PnP: 0x2b008c0e 1047 * SB AWE64 PnP: 0x39008c0e 0x9d008c0e 0xc3008c0e 1048 */ 1049 if ( (vend_id & 0xffffff) == (0x9d008c0e & 0xffffff) ) |
1037 s = "SB AWE64 PnP"; | 1050 s = "SB16 PnP"; 1051 else if (vend_id == 0x01009305) 1052 s = "Avance Asound 100" ; |
1038 if (s) { 1039 struct pnp_cinfo d; 1040 read_pnp_parms(&d, 0); 1041 if (d.enable == 0) { 1042 printf("This is a %s, but LDN 0 is disabled\n", s); 1043 return NULL ; 1044 } 1045 return s ; --- 33 unchanged lines hidden --- | 1053 if (s) { 1054 struct pnp_cinfo d; 1055 read_pnp_parms(&d, 0); 1056 if (d.enable == 0) { 1057 printf("This is a %s, but LDN 0 is disabled\n", s); 1058 return NULL ; 1059 } 1060 return s ; --- 33 unchanged lines hidden --- |