Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15920
b: refs/heads/master
c: 6ef7e86
h: refs/heads/master
v: v3
  • Loading branch information
James Courtier-Dutton authored and Jaroslav Kysela committed Jan 3, 2006
1 parent a52956e commit d5f14d6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e2b15f8f7dfc7a60ab89162502732120792a644f
refs/heads/master: 6ef7e8614c03f90ecb924938f5cc074af2723d35
16 changes: 14 additions & 2 deletions trunk/sound/pci/emu10k1/emuproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ static void snd_emu_proc_ptr_reg_read(snd_info_entry_t *entry,
emu10k1_t *emu = entry->private_data;
unsigned long value;
int i,j;
if (offset+length > 0x80) {
if (offset+length > 0xa0) {
snd_iprintf(buffer, "Input values out of range\n");
return;
}
Expand All @@ -472,7 +472,7 @@ static void snd_emu_proc_ptr_reg_write(snd_info_entry_t *entry,
while (!snd_info_get_line(buffer, line, sizeof(line))) {
if (sscanf(line, "%x %x %x", &reg, &channel_id, &val) != 3)
continue;
if ((reg < 0x80) && (reg >=0) && (val <= 0xffffffff) && (channel_id >=0) && (channel_id <= 3) )
if ((reg < 0xa0) && (reg >=0) && (val <= 0xffffffff) && (channel_id >=0) && (channel_id <= 3) )
snd_ptr_write(emu, iobase, reg, channel_id, val);
}
}
Expand Down Expand Up @@ -513,6 +513,12 @@ static void snd_emu_proc_ptr_reg_read20b(snd_info_entry_t *entry,
{
snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x40, 0x40, 4);
}

static void snd_emu_proc_ptr_reg_read20c(snd_info_entry_t *entry,
snd_info_buffer_t * buffer)
{
snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x80, 0x20, 4);
}
#endif

static struct snd_info_entry_ops snd_emu10k1_proc_ops_fx8010 = {
Expand Down Expand Up @@ -553,6 +559,12 @@ int __devinit snd_emu10k1_proc_init(emu10k1_t * emu)
entry->c.text.write = snd_emu_proc_ptr_reg_write20;
entry->mode |= S_IWUSR;
}
if (! snd_card_proc_new(emu->card, "ptr_regs20c", &entry)) {
snd_info_set_text_ops(entry, emu, 65536, snd_emu_proc_ptr_reg_read20c);
entry->c.text.write_size = 64;
entry->c.text.write = snd_emu_proc_ptr_reg_write20;
entry->mode |= S_IWUSR;
}
#endif

if (! snd_card_proc_new(emu->card, "emu10k1", &entry))
Expand Down

0 comments on commit d5f14d6

Please sign in to comment.