aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Courtier-Dutton <James@superbug.co.uk>2007-07-23 09:01:46 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:57:43 -0400
commit90fd5ce5f67968d3250eeab9bc1f6822644347ef (patch)
tree9bec33c26b7cc6fac6765eb85bb317f7911f07cc
parent25765c4e5de8edcd06b60993b63feeed9e7885c1 (diff)
[ALSA] snd-emu10k1: Add support for E-Mu 1616 PCI, 1616M PCI, 0404 PCI, E-Mu
Notebook. Description: The .device=0x0008 chips have new, but different EMU32 in/out channels. Driver updated to make use of these EMU32 channels. Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r--include/sound/emu10k1.h2
-rw-r--r--sound/pci/emu10k1/emufx.c230
-rw-r--r--sound/pci/emu10k1/emuproc.c8
3 files changed, 132 insertions, 108 deletions
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 529d0a564367..868f3bdb9829 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -1746,6 +1746,8 @@ int snd_emu10k1_fx8010_unregister_irq_handler(struct snd_emu10k1 *emu,
1746#define A_FXBUS2(x) (0x80 + (x)) /* x = 0x00 - 0x1f extra outs used for EFX capture -> A_FXWC2 */ 1746#define A_FXBUS2(x) (0x80 + (x)) /* x = 0x00 - 0x1f extra outs used for EFX capture -> A_FXWC2 */
1747#define A_EMU32OUTH(x) (0xa0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_10 - _1F" - ??? */ 1747#define A_EMU32OUTH(x) (0xa0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_10 - _1F" - ??? */
1748#define A_EMU32OUTL(x) (0xb0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_1 - _F" - ??? */ 1748#define A_EMU32OUTL(x) (0xb0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_1 - _F" - ??? */
1749#define A3_EMU32IN(x) (0x160 + (x)) /* x = 0x00 - 0x3f "EMU32_IN_00 - _3F" - Only when .device = 0x0008 */
1750#define A3_EMU32OUT(x) (0x1E0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_00 - _3F" - Only when .device = 0x0008 */
1749#define A_GPR(x) (A_FXGPREGBASE + (x)) 1751#define A_GPR(x) (A_FXGPREGBASE + (x))
1750 1752
1751/* cc_reg constants */ 1753/* cc_reg constants */
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index 7206c0fa06f2..febdd130a209 100644
--- a/sound/pci/emu10k1/emufx.c
+++ b/sound/pci/emu10k1/emufx.c
@@ -1207,7 +1207,7 @@ static int __devinit _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu)
1207 A_OP(icode, &ptr, iMAC0, A_GPR(playback+1), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_FRONT)); 1207 A_OP(icode, &ptr, iMAC0, A_GPR(playback+1), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_FRONT));
1208 snd_emu10k1_init_stereo_control(&controls[nctl++], "PCM Front Playback Volume", gpr, 100); 1208 snd_emu10k1_init_stereo_control(&controls[nctl++], "PCM Front Playback Volume", gpr, 100);
1209 gpr += 2; 1209 gpr += 2;
1210 1210
1211 /* PCM Surround Playback (independent from stereo mix) */ 1211 /* PCM Surround Playback (independent from stereo mix) */
1212 A_OP(icode, &ptr, iMAC0, A_GPR(playback+2), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT_REAR)); 1212 A_OP(icode, &ptr, iMAC0, A_GPR(playback+2), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT_REAR));
1213 A_OP(icode, &ptr, iMAC0, A_GPR(playback+3), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_REAR)); 1213 A_OP(icode, &ptr, iMAC0, A_GPR(playback+3), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_REAR));
@@ -1267,8 +1267,16 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
1267 1267
1268 /* emu1212 DSP 0 and DSP 1 Capture */ 1268 /* emu1212 DSP 0 and DSP 1 Capture */
1269 if (emu->card_capabilities->emu1010) { 1269 if (emu->card_capabilities->emu1010) {
1270 A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_GPR(capture+0), A_GPR(gpr), A_P16VIN(0x0)); 1270 if (emu->card_capabilities->ca0108_chip) {
1271 A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_GPR(capture+1), A_GPR(gpr+1), A_P16VIN(0x1)); 1271 /* Note:JCD:No longer bit shift lower 16bits to upper 16bits of 32bit value. */
1272 A_OP(icode, &ptr, iMACINT0, A_GPR(tmp), A_C_00000000, A3_EMU32IN(0x0), A_C_00000001);
1273 A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_GPR(capture+0), A_GPR(gpr), A_GPR(tmp));
1274 A_OP(icode, &ptr, iMACINT0, A_GPR(tmp), A_C_00000000, A3_EMU32IN(0x1), A_C_00000001);
1275 A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_GPR(capture+1), A_GPR(gpr), A_GPR(tmp));
1276 } else {
1277 A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_GPR(capture+0), A_GPR(gpr), A_P16VIN(0x0));
1278 A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_GPR(capture+1), A_GPR(gpr+1), A_P16VIN(0x1));
1279 }
1272 snd_emu10k1_init_stereo_control(&controls[nctl++], "EMU Capture Volume", gpr, 0); 1280 snd_emu10k1_init_stereo_control(&controls[nctl++], "EMU Capture Volume", gpr, 0);
1273 gpr += 2; 1281 gpr += 2;
1274 } 1282 }
@@ -1516,7 +1524,11 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
1516 /* EMU1010 Outputs from PCM Front, Rear, Center, LFE, Side */ 1524 /* EMU1010 Outputs from PCM Front, Rear, Center, LFE, Side */
1517 snd_printk("EMU outputs on\n"); 1525 snd_printk("EMU outputs on\n");
1518 for (z = 0; z < 8; z++) { 1526 for (z = 0; z < 8; z++) {
1519 A_OP(icode, &ptr, iACC3, A_EMU32OUTL(z), A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), A_C_00000000, A_C_00000000); 1527 if (emu->card_capabilities->ca0108_chip) {
1528 A_OP(icode, &ptr, iACC3, A3_EMU32OUT(z), A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), A_C_00000000, A_C_00000000);
1529 } else {
1530 A_OP(icode, &ptr, iACC3, A_EMU32OUTL(z), A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), A_C_00000000, A_C_00000000);
1531 }
1520 } 1532 }
1521 } 1533 }
1522 1534
@@ -1557,106 +1569,116 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
1557#endif 1569#endif
1558 1570
1559 if (emu->card_capabilities->emu1010) { 1571 if (emu->card_capabilities->emu1010) {
1560 snd_printk("EMU inputs on\n"); 1572 if (emu->card_capabilities->ca0108_chip) {
1561 /* Capture 16 (originally 8) channels of S32_LE sound */ 1573 snd_printk("EMU2 inputs on\n");
1562 1574 for (z = 0; z < 0x10; z++) {
1563 /* printk("emufx.c: gpr=0x%x, tmp=0x%x\n",gpr, tmp); */ 1575 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp,
1564 /* For the EMU1010: How to get 32bit values from the DSP. High 16bits into L, low 16bits into R. */ 1576 bit_shifter16,
1565 /* A_P16VIN(0) is delayed by one sample, 1577 A3_EMU32IN(z),
1566 * so all other A_P16VIN channels will need to also be delayed 1578 A_FXBUS2(z*2) );
1567 */ 1579 }
1568 /* Left ADC in. 1 of 2 */ 1580 } else {
1569 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_P16VIN(0x0), A_FXBUS2(0) ); 1581 snd_printk("EMU inputs on\n");
1570 /* Right ADC in 1 of 2 */ 1582 /* Capture 16 (originally 8) channels of S32_LE sound */
1571 gpr_map[gpr++] = 0x00000000; 1583
1572 /* Delaying by one sample: instead of copying the input 1584 /* printk("emufx.c: gpr=0x%x, tmp=0x%x\n",gpr, tmp); */
1573 * value A_P16VIN to output A_FXBUS2 as in the first channel, 1585 /* For the EMU1010: How to get 32bit values from the DSP. High 16bits into L, low 16bits into R. */
1574 * we use an auxiliary register, delaying the value by one 1586 /* A_P16VIN(0) is delayed by one sample,
1575 * sample 1587 * so all other A_P16VIN channels will need to also be delayed
1576 */ 1588 */
1577 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(2) ); 1589 /* Left ADC in. 1 of 2 */
1578 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x1), A_C_00000000, A_C_00000000); 1590 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_P16VIN(0x0), A_FXBUS2(0) );
1579 gpr_map[gpr++] = 0x00000000; 1591 /* Right ADC in 1 of 2 */
1580 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(4) ); 1592 gpr_map[gpr++] = 0x00000000;
1581 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x2), A_C_00000000, A_C_00000000); 1593 /* Delaying by one sample: instead of copying the input
1582 gpr_map[gpr++] = 0x00000000; 1594 * value A_P16VIN to output A_FXBUS2 as in the first channel,
1583 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(6) ); 1595 * we use an auxiliary register, delaying the value by one
1584 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x3), A_C_00000000, A_C_00000000); 1596 * sample
1585 /* For 96kHz mode */ 1597 */
1586 /* Left ADC in. 2 of 2 */ 1598 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(2) );
1587 gpr_map[gpr++] = 0x00000000; 1599 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x1), A_C_00000000, A_C_00000000);
1588 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0x8) ); 1600 gpr_map[gpr++] = 0x00000000;
1589 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x4), A_C_00000000, A_C_00000000); 1601 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(4) );
1590 /* Right ADC in 2 of 2 */ 1602 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x2), A_C_00000000, A_C_00000000);
1591 gpr_map[gpr++] = 0x00000000; 1603 gpr_map[gpr++] = 0x00000000;
1592 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0xa) ); 1604 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(6) );
1593 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x5), A_C_00000000, A_C_00000000); 1605 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x3), A_C_00000000, A_C_00000000);
1594 gpr_map[gpr++] = 0x00000000; 1606 /* For 96kHz mode */
1595 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0xc) ); 1607 /* Left ADC in. 2 of 2 */
1596 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x6), A_C_00000000, A_C_00000000); 1608 gpr_map[gpr++] = 0x00000000;
1597 gpr_map[gpr++] = 0x00000000; 1609 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0x8) );
1598 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0xe) ); 1610 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x4), A_C_00000000, A_C_00000000);
1599 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x7), A_C_00000000, A_C_00000000); 1611 /* Right ADC in 2 of 2 */
1600 /* Pavel Hofman - we still have voices, A_FXBUS2s, and 1612 gpr_map[gpr++] = 0x00000000;
1601 * A_P16VINs available - 1613 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0xa) );
1602 * let's add 8 more capture channels - total of 16 1614 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x5), A_C_00000000, A_C_00000000);
1603 */ 1615 gpr_map[gpr++] = 0x00000000;
1604 gpr_map[gpr++] = 0x00000000; 1616 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0xc) );
1605 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, 1617 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x6), A_C_00000000, A_C_00000000);
1606 bit_shifter16, 1618 gpr_map[gpr++] = 0x00000000;
1607 A_GPR(gpr - 1), 1619 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0xe) );
1608 A_FXBUS2(0x10)); 1620 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x7), A_C_00000000, A_C_00000000);
1609 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x8), 1621 /* Pavel Hofman - we still have voices, A_FXBUS2s, and
1610 A_C_00000000, A_C_00000000); 1622 * A_P16VINs available -
1611 gpr_map[gpr++] = 0x00000000; 1623 * let's add 8 more capture channels - total of 16
1612 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, 1624 */
1613 bit_shifter16, 1625 gpr_map[gpr++] = 0x00000000;
1614 A_GPR(gpr - 1), 1626 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp,
1615 A_FXBUS2(0x12)); 1627 bit_shifter16,
1616 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x9), 1628 A_GPR(gpr - 1),
1617 A_C_00000000, A_C_00000000); 1629 A_FXBUS2(0x10));
1618 gpr_map[gpr++] = 0x00000000; 1630 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x8),
1619 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, 1631 A_C_00000000, A_C_00000000);
1620 bit_shifter16, 1632 gpr_map[gpr++] = 0x00000000;
1621 A_GPR(gpr - 1), 1633 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp,
1622 A_FXBUS2(0x14)); 1634 bit_shifter16,
1623 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xa), 1635 A_GPR(gpr - 1),
1624 A_C_00000000, A_C_00000000); 1636 A_FXBUS2(0x12));
1625 gpr_map[gpr++] = 0x00000000; 1637 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x9),
1626 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, 1638 A_C_00000000, A_C_00000000);
1627 bit_shifter16, 1639 gpr_map[gpr++] = 0x00000000;
1628 A_GPR(gpr - 1), 1640 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp,
1629 A_FXBUS2(0x16)); 1641 bit_shifter16,
1630 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xb), 1642 A_GPR(gpr - 1),
1631 A_C_00000000, A_C_00000000); 1643 A_FXBUS2(0x14));
1632 gpr_map[gpr++] = 0x00000000; 1644 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xa),
1633 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, 1645 A_C_00000000, A_C_00000000);
1634 bit_shifter16, 1646 gpr_map[gpr++] = 0x00000000;
1635 A_GPR(gpr - 1), 1647 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp,
1636 A_FXBUS2(0x18)); 1648 bit_shifter16,
1637 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xc), 1649 A_GPR(gpr - 1),
1638 A_C_00000000, A_C_00000000); 1650 A_FXBUS2(0x16));
1639 gpr_map[gpr++] = 0x00000000; 1651 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xb),
1640 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, 1652 A_C_00000000, A_C_00000000);
1641 bit_shifter16, 1653 gpr_map[gpr++] = 0x00000000;
1642 A_GPR(gpr - 1), 1654 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp,
1643 A_FXBUS2(0x1a)); 1655 bit_shifter16,
1644 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xd), 1656 A_GPR(gpr - 1),
1645 A_C_00000000, A_C_00000000); 1657 A_FXBUS2(0x18));
1646 gpr_map[gpr++] = 0x00000000; 1658 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xc),
1647 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, 1659 A_C_00000000, A_C_00000000);
1648 bit_shifter16, 1660 gpr_map[gpr++] = 0x00000000;
1649 A_GPR(gpr - 1), 1661 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp,
1650 A_FXBUS2(0x1c)); 1662 bit_shifter16,
1651 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xe), 1663 A_GPR(gpr - 1),
1652 A_C_00000000, A_C_00000000); 1664 A_FXBUS2(0x1a));
1653 gpr_map[gpr++] = 0x00000000; 1665 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xd),
1654 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, 1666 A_C_00000000, A_C_00000000);
1655 bit_shifter16, 1667 gpr_map[gpr++] = 0x00000000;
1656 A_GPR(gpr - 1), 1668 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp,
1657 A_FXBUS2(0x1e)); 1669 bit_shifter16,
1658 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xf), 1670 A_GPR(gpr - 1),
1659 A_C_00000000, A_C_00000000); 1671 A_FXBUS2(0x1c));
1672 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xe),
1673 A_C_00000000, A_C_00000000);
1674 gpr_map[gpr++] = 0x00000000;
1675 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp,
1676 bit_shifter16,
1677 A_GPR(gpr - 1),
1678 A_FXBUS2(0x1e));
1679 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xf),
1680 A_C_00000000, A_C_00000000);
1681 }
1660 1682
1661#if 0 1683#if 0
1662 for (z = 4; z < 8; z++) { 1684 for (z = 4; z < 8; z++) {
diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c
index 2c1585991bc8..a0dae0d916cb 100644
--- a/sound/pci/emu10k1/emuproc.c
+++ b/sound/pci/emu10k1/emuproc.c
@@ -385,7 +385,7 @@ static void snd_emu_proc_emu1010_reg_read(struct snd_info_entry *entry,
385 int i; 385 int i;
386 snd_iprintf(buffer, "EMU1010 Registers:\n\n"); 386 snd_iprintf(buffer, "EMU1010 Registers:\n\n");
387 387
388 for(i = 0; i < 0x30; i+=1) { 388 for(i = 0; i < 0x40; i+=1) {
389 spin_lock_irqsave(&emu->emu_lock, flags); 389 spin_lock_irqsave(&emu->emu_lock, flags);
390 regs=i+0x40; /* 0x40 upwards are registers. */ 390 regs=i+0x40; /* 0x40 upwards are registers. */
391 outl(regs, emu->port + A_IOCFG); 391 outl(regs, emu->port + A_IOCFG);
@@ -555,9 +555,9 @@ int __devinit snd_emu10k1_proc_init(struct snd_emu10k1 * emu)
555{ 555{
556 struct snd_info_entry *entry; 556 struct snd_info_entry *entry;
557#ifdef CONFIG_SND_DEBUG 557#ifdef CONFIG_SND_DEBUG
558 if ((emu->card_capabilities->emu1010) && 558 if (emu->card_capabilities->emu1010) {
559 snd_card_proc_new(emu->card, "emu1010_regs", &entry)) { 559 if (! snd_card_proc_new(emu->card, "emu1010_regs", &entry))
560 snd_info_set_text_ops(entry, emu, snd_emu_proc_emu1010_reg_read); 560 snd_info_set_text_ops(entry, emu, snd_emu_proc_emu1010_reg_read);
561 } 561 }
562 if (! snd_card_proc_new(emu->card, "io_regs", &entry)) { 562 if (! snd_card_proc_new(emu->card, "io_regs", &entry)) {
563 snd_info_set_text_ops(entry, emu, snd_emu_proc_io_reg_read); 563 snd_info_set_text_ops(entry, emu, snd_emu_proc_io_reg_read);