diff options
-rw-r--r-- | sound/pci/emu10k1/emuproc.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c index cc22707c91fa..6cdee588d35d 100644 --- a/sound/pci/emu10k1/emuproc.c +++ b/sound/pci/emu10k1/emuproc.c | |||
@@ -445,7 +445,7 @@ static void snd_emu_proc_ptr_reg_read(snd_info_entry_t *entry, | |||
445 | emu10k1_t *emu = entry->private_data; | 445 | emu10k1_t *emu = entry->private_data; |
446 | unsigned long value; | 446 | unsigned long value; |
447 | int i,j; | 447 | int i,j; |
448 | if (offset+length > 0x80) { | 448 | if (offset+length > 0xa0) { |
449 | snd_iprintf(buffer, "Input values out of range\n"); | 449 | snd_iprintf(buffer, "Input values out of range\n"); |
450 | return; | 450 | return; |
451 | } | 451 | } |
@@ -472,7 +472,7 @@ static void snd_emu_proc_ptr_reg_write(snd_info_entry_t *entry, | |||
472 | while (!snd_info_get_line(buffer, line, sizeof(line))) { | 472 | while (!snd_info_get_line(buffer, line, sizeof(line))) { |
473 | if (sscanf(line, "%x %x %x", ®, &channel_id, &val) != 3) | 473 | if (sscanf(line, "%x %x %x", ®, &channel_id, &val) != 3) |
474 | continue; | 474 | continue; |
475 | if ((reg < 0x80) && (reg >=0) && (val <= 0xffffffff) && (channel_id >=0) && (channel_id <= 3) ) | 475 | if ((reg < 0xa0) && (reg >=0) && (val <= 0xffffffff) && (channel_id >=0) && (channel_id <= 3) ) |
476 | snd_ptr_write(emu, iobase, reg, channel_id, val); | 476 | snd_ptr_write(emu, iobase, reg, channel_id, val); |
477 | } | 477 | } |
478 | } | 478 | } |
@@ -513,6 +513,12 @@ static void snd_emu_proc_ptr_reg_read20b(snd_info_entry_t *entry, | |||
513 | { | 513 | { |
514 | snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x40, 0x40, 4); | 514 | snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x40, 0x40, 4); |
515 | } | 515 | } |
516 | |||
517 | static void snd_emu_proc_ptr_reg_read20c(snd_info_entry_t *entry, | ||
518 | snd_info_buffer_t * buffer) | ||
519 | { | ||
520 | snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x80, 0x20, 4); | ||
521 | } | ||
516 | #endif | 522 | #endif |
517 | 523 | ||
518 | static struct snd_info_entry_ops snd_emu10k1_proc_ops_fx8010 = { | 524 | static struct snd_info_entry_ops snd_emu10k1_proc_ops_fx8010 = { |
@@ -553,6 +559,12 @@ int __devinit snd_emu10k1_proc_init(emu10k1_t * emu) | |||
553 | entry->c.text.write = snd_emu_proc_ptr_reg_write20; | 559 | entry->c.text.write = snd_emu_proc_ptr_reg_write20; |
554 | entry->mode |= S_IWUSR; | 560 | entry->mode |= S_IWUSR; |
555 | } | 561 | } |
562 | if (! snd_card_proc_new(emu->card, "ptr_regs20c", &entry)) { | ||
563 | snd_info_set_text_ops(entry, emu, 65536, snd_emu_proc_ptr_reg_read20c); | ||
564 | entry->c.text.write_size = 64; | ||
565 | entry->c.text.write = snd_emu_proc_ptr_reg_write20; | ||
566 | entry->mode |= S_IWUSR; | ||
567 | } | ||
556 | #endif | 568 | #endif |
557 | 569 | ||
558 | if (! snd_card_proc_new(emu->card, "emu10k1", &entry)) | 570 | if (! snd_card_proc_new(emu->card, "emu10k1", &entry)) |