From: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@perex.cz>
Subject: [PATCH 1/6] ALSA: emu10k1: hide absent 2nd pointer-offset register set from /proc
Date: Fri, 26 May 2023 12:16:54 +0200 [thread overview]
Message-ID: <20230526101659.437969-2-oswald.buddenhagen@gmx.de> (raw)
In-Reply-To: <20230526101659.437969-1-oswald.buddenhagen@gmx.de>
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>
---
sound/pci/emu10k1/emuproc.c | 22 +++++++++++++---------
1 file 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);
--
2.40.0.152.g15d061e6df
next prev parent reply other threads:[~2023-05-26 10:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-26 10:16 [PATCH 0/6] ALSA: emu10k1: improvements related to the driver's procfs Oswald Buddenhagen
2023-05-26 10:16 ` Oswald Buddenhagen [this message]
2023-05-26 10:16 ` [PATCH 2/6] ALSA: emu10k1: fix writing 1st pointer-offset register set through /proc Oswald Buddenhagen
2023-05-26 10:16 ` [PATCH 3/6] ALSA: emu10k1: actually disassemble DSP instructions in /proc Oswald Buddenhagen
2023-05-28 0:08 ` kernel test robot
2023-05-29 9:03 ` kernel test robot
2023-05-26 10:16 ` [PATCH 4/6] ALSA: emu10k1: include FX send amounts in /proc output Oswald Buddenhagen
2023-05-26 10:16 ` [PATCH 5/6] ALSA: emu10k1: make E-MU FPGA register dump in /proc more useful Oswald Buddenhagen
2023-05-26 10:16 ` [PATCH 6/6] ALSA: emu10k1: vastly improve usefulness of info in /proc Oswald Buddenhagen
2023-05-29 9:55 ` [PATCH v2] ALSA: emu10k1: actually disassemble DSP instructions " Oswald Buddenhagen
2023-05-29 9:56 ` [PATCH 0/6] ALSA: emu10k1: improvements related to the driver's procfs Oswald Buddenhagen
2023-06-05 7:27 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230526101659.437969-2-oswald.buddenhagen@gmx.de \
--to=oswald.buddenhagen@gmx.de \
--cc=alsa-devel@alsa-project.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox