ALSA: ymfpci: Add error messages for abritrary IO ports on older chips
authorTasos Sahanidis <tasos@tasossah.com>
Wed, 29 Mar 2023 03:42:04 +0000 (06:42 +0300)
committerTakashi Iwai <tiwai@suse.de>
Wed, 29 Mar 2023 06:27:48 +0000 (08:27 +0200)
commitf09467e06b8add14fa294d38a1a2e91e36c97157
tree15396684d02424624e67381158471c78f5310565
parent03f62c9cefdb833ab77bfef63066e923696dac0f
ALSA: ymfpci: Add error messages for abritrary IO ports on older chips

As an end user, it can be confusing to request an arbitrary IO port be
used only to find out that it doesn't work without an obvious reason,
especially since /sys/module/snd_ymfpci/parameters/{fm,joystick,mpu}_port
indicate 0 after the module has been loaded.

In my case, I was unaware that the YMF724 did not support such usage, and
thus ended up spending time attempting to debug the issue.

Now, when a user attempts to request an IO port that isn't supported by
the hardware, the following message is printed:

[   25.549530] snd_ymfpci 0000:06:05.0: The Yamaha DS-1 (YMF724F) does not support arbitrary IO ports for FM (requested 0x1234)

Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
Link: https://lore.kernel.org/r/20230329034204.171901-1-tasos@tasossah.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ymfpci/ymfpci.c