From: Icenowy Zheng <uwu@icenowy.me>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
Icenowy Zheng <uwu@icenowy.me>
Subject: [PATCH 1/2] ALSA: emu10k1: add a capability bit for no MIDI
Date: Sun, 13 Oct 2024 09:47:12 +0800 [thread overview]
Message-ID: <20241013014714.7686-2-uwu@icenowy.me> (raw)
In-Reply-To: <20241013014714.7686-1-uwu@icenowy.me>
Audigy Rx is a card born in the era that USB MIDI has been the
mainstream form of PC MIDI interface, and no external MIDI I/O is made
available on Audigy Rx.
Add a capability bit for emu10k1 driver to be able to hide the MPU-401
ports.
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
---
include/sound/emu10k1.h | 1 +
sound/pci/emu10k1/emu10k1.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index 38db50b280eba..9172674838627 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -1673,6 +1673,7 @@ struct snd_emu_chip_details {
unsigned int i2c_adc:1; /* I2C interface for ADC; requires ca0108_chip */
unsigned int adc_1361t:1; /* Use Philips 1361T ADC */
unsigned int invert_shared_spdif:1; /* analog/digital switch inverted */
+ unsigned int no_midi:1; /* Has no MIDI */
const char *driver;
const char *name;
const char *id; /* for backward compatibility - can be NULL if not needed */
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c
index dadeda7758cee..d323ebbc0368f 100644
--- a/sound/pci/emu10k1/emu10k1.c
+++ b/sound/pci/emu10k1/emu10k1.c
@@ -133,7 +133,9 @@ static int snd_card_emu10k1_probe(struct pci_dev *pci,
if (err < 0)
return err;
}
- if (emu->audigy) {
+ if (emu->card_capabilities->no_midi) {
+ dev_info(emu->card->dev, "Card has no ext. MIDI ports.\n");
+ } else if (emu->audigy) {
err = snd_emu10k1_audigy_midi(emu);
if (err < 0)
return err;
--
2.47.0
next prev parent reply other threads:[~2024-10-13 1:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-13 1:47 [PATCH 0/2] ALSA: emu10k1: hide MPU-401 ports for Audigy Rx Icenowy Zheng
2024-10-13 1:47 ` Icenowy Zheng [this message]
2024-10-13 9:54 ` [PATCH 1/2] ALSA: emu10k1: add a capability bit for no MIDI Oswald Buddenhagen
2024-10-13 10:04 ` Icenowy Zheng
2024-10-13 1:47 ` [PATCH 2/2] ALSA: emu10k1: hide ext. MIDI ports for Audigy Rx Icenowy Zheng
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=20241013014714.7686-2-uwu@icenowy.me \
--to=uwu@icenowy.me \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=oswald.buddenhagen@gmx.de \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/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