summaryrefslogtreecommitdiff
path: root/sound/pci/emu10k1/emuproc.c
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>2023-05-26 12:16:54 +0200
committerTakashi Iwai <tiwai@suse.de>2023-06-05 09:25:02 +0200
commit219153c6ed46b064f9c2b0f70dacf21f719751ee (patch)
tree6a4c49fe1cae30d7539880782b4c00a364b32f16 /sound/pci/emu10k1/emuproc.c
parentc894ec016c9d0418dd832202225a8c64f450d71e (diff)
ALSA: emu10k1: hide absent 2nd pointer-offset register set from /proc
The 2nd register set belongs to the P16V chip (or embedded P17V module), so there is nothing to show when no such part is present. Gen2 E-MU cards have a P17V, but it's entirely unused, so we hide it there as well. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230526101659.437969-2-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1/emuproc.c')
-rw-r--r--sound/pci/emu10k1/emuproc.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c
index 89ea3adff322..6cf4a7e16b1d 100644
--- a/sound/pci/emu10k1/emuproc.c
+++ b/sound/pci/emu10k1/emuproc.c
@@ -561,15 +561,19 @@ int snd_emu10k1_proc_init(struct snd_emu10k1 *emu)
snd_card_rw_proc_new(emu->card, "ptr_regs00b", emu,
snd_emu_proc_ptr_reg_read00b,
snd_emu_proc_ptr_reg_write00);
- snd_card_rw_proc_new(emu->card, "ptr_regs20a", emu,
- snd_emu_proc_ptr_reg_read20a,
- snd_emu_proc_ptr_reg_write20);
- snd_card_rw_proc_new(emu->card, "ptr_regs20b", emu,
- snd_emu_proc_ptr_reg_read20b,
- snd_emu_proc_ptr_reg_write20);
- snd_card_rw_proc_new(emu->card, "ptr_regs20c", emu,
- snd_emu_proc_ptr_reg_read20c,
- snd_emu_proc_ptr_reg_write20);
+ if (!emu->card_capabilities->emu_model &&
+ (emu->card_capabilities->ca0151_chip || emu->card_capabilities->ca0108_chip)) {
+ snd_card_rw_proc_new(emu->card, "ptr_regs20a", emu,
+ snd_emu_proc_ptr_reg_read20a,
+ snd_emu_proc_ptr_reg_write20);
+ snd_card_rw_proc_new(emu->card, "ptr_regs20b", emu,
+ snd_emu_proc_ptr_reg_read20b,
+ snd_emu_proc_ptr_reg_write20);
+ if (emu->card_capabilities->ca0108_chip)
+ snd_card_rw_proc_new(emu->card, "ptr_regs20c", emu,
+ snd_emu_proc_ptr_reg_read20c,
+ snd_emu_proc_ptr_reg_write20);
+ }
#endif
snd_card_ro_proc_new(emu->card, "emu10k1", emu, snd_emu10k1_proc_read);