linux-sound.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* question on sound/isa/msnd/msnd_midi.c
@ 2025-05-08 11:36 Dr. David Alan Gilbert
  2025-05-11 14:13 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2025-05-08 11:36 UTC (permalink / raw)
  To: perex, tiwai, krzysztof.h1; +Cc: linux-sound, linux-kernel

Hi,
   I noticed that nothing calls snd_msndmidi_new in
sound/isa/msnd/msnd_midi.c and was about to delete it, but I'm not
too sure - I think it's actually a bug where it should be called.

  This code was added in 2009 by
commit f6c638350275 ("ALSA: Turtle Beach Multisound Classic/Pinnacle driver")
(Pretty new for an ISA card!)

Looking at msnd_midi.c the only function in there that anything
calls is snd_msndmidi_input_read() called by msnd_pinnacle.c but that
is guarded by a check:

  146    if (chip->msndmidi_mpu)
  147          snd_msndmidi_input_read(chip->msndmidi_mpu);   

but I don't think anything sets that msndmidi_mpu, since the only
thing that could is snd_msndmidi_new() which isn't called.

I see that the original poster didn't test the external midi:
   https://mailman.alsa-project.org/hyperkitty/list/alsa-devel@alsa-project.org/message/CWPYLPLJQEK64UU3YFCAMVXGDY42QKF2/
so I guess this has always been missing.

I don't have the hardware to test.

Thoughts?

Dave

-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: question on sound/isa/msnd/msnd_midi.c
  2025-05-08 11:36 question on sound/isa/msnd/msnd_midi.c Dr. David Alan Gilbert
@ 2025-05-11 14:13 ` Takashi Iwai
  2025-05-11 16:47   ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2025-05-11 14:13 UTC (permalink / raw)
  To: Dr. David Alan Gilbert
  Cc: perex, tiwai, krzysztof.h1, linux-sound, linux-kernel

On Thu, 08 May 2025 13:36:04 +0200,
Dr. David Alan Gilbert wrote:
> 
> Hi,
>    I noticed that nothing calls snd_msndmidi_new in
> sound/isa/msnd/msnd_midi.c and was about to delete it, but I'm not
> too sure - I think it's actually a bug where it should be called.
> 
>   This code was added in 2009 by
> commit f6c638350275 ("ALSA: Turtle Beach Multisound Classic/Pinnacle driver")
> (Pretty new for an ISA card!)
> 
> Looking at msnd_midi.c the only function in there that anything
> calls is snd_msndmidi_input_read() called by msnd_pinnacle.c but that
> is guarded by a check:
> 
>   146    if (chip->msndmidi_mpu)
>   147          snd_msndmidi_input_read(chip->msndmidi_mpu);   
> 
> but I don't think anything sets that msndmidi_mpu, since the only
> thing that could is snd_msndmidi_new() which isn't called.
> 
> I see that the original poster didn't test the external midi:
>    https://mailman.alsa-project.org/hyperkitty/list/alsa-devel@alsa-project.org/message/CWPYLPLJQEK64UU3YFCAMVXGDY42QKF2/
> so I guess this has always been missing.
> 
> I don't have the hardware to test.
> 
> Thoughts?

Well, it's a very old code on an old interface, and if it's not used
(even because of a typo or an overlook), then it's basically no chance
to be used in future.  Let's rip off.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: question on sound/isa/msnd/msnd_midi.c
  2025-05-11 14:13 ` Takashi Iwai
@ 2025-05-11 16:47   ` Dr. David Alan Gilbert
  2025-05-11 17:31     ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2025-05-11 16:47 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: perex, tiwai, krzysztof.h1, linux-sound, linux-kernel

* Takashi Iwai (tiwai@suse.de) wrote:
> On Thu, 08 May 2025 13:36:04 +0200,
> Dr. David Alan Gilbert wrote:
> > 
> > Hi,
> >    I noticed that nothing calls snd_msndmidi_new in
> > sound/isa/msnd/msnd_midi.c and was about to delete it, but I'm not
> > too sure - I think it's actually a bug where it should be called.
> > 
> >   This code was added in 2009 by
> > commit f6c638350275 ("ALSA: Turtle Beach Multisound Classic/Pinnacle driver")
> > (Pretty new for an ISA card!)
> > 
> > Looking at msnd_midi.c the only function in there that anything
> > calls is snd_msndmidi_input_read() called by msnd_pinnacle.c but that
> > is guarded by a check:
> > 
> >   146    if (chip->msndmidi_mpu)
> >   147          snd_msndmidi_input_read(chip->msndmidi_mpu);   
> > 
> > but I don't think anything sets that msndmidi_mpu, since the only
> > thing that could is snd_msndmidi_new() which isn't called.
> > 
> > I see that the original poster didn't test the external midi:
> >    https://mailman.alsa-project.org/hyperkitty/list/alsa-devel@alsa-project.org/message/CWPYLPLJQEK64UU3YFCAMVXGDY42QKF2/
> > so I guess this has always been missing.
> > 
> > I don't have the hardware to test.
> > 
> > Thoughts?
> 
> Well, it's a very old code on an old interface, and if it's not used
> (even because of a typo or an overlook), then it's basically no chance
> to be used in future.  Let's rip off.

Ok, I'll cut a patch to remove snd_msndmidi_new() and then probably the whole
of msnd_midi.c and the call in msnd_pinnacle.c

Dave

> 
> thanks,
> 
> Takashi
> 
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: question on sound/isa/msnd/msnd_midi.c
  2025-05-11 16:47   ` Dr. David Alan Gilbert
@ 2025-05-11 17:31     ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2025-05-11 17:31 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: perex, tiwai, krzysztof.h1, linux-sound, linux-kernel

* Dr. David Alan Gilbert (linux@treblig.org) wrote:
> * Takashi Iwai (tiwai@suse.de) wrote:
> > On Thu, 08 May 2025 13:36:04 +0200,
> > Dr. David Alan Gilbert wrote:
> > > 
> > > Hi,
> > >    I noticed that nothing calls snd_msndmidi_new in
> > > sound/isa/msnd/msnd_midi.c and was about to delete it, but I'm not
> > > too sure - I think it's actually a bug where it should be called.
> > > 
> > >   This code was added in 2009 by
> > > commit f6c638350275 ("ALSA: Turtle Beach Multisound Classic/Pinnacle driver")
> > > (Pretty new for an ISA card!)
> > > 
> > > Looking at msnd_midi.c the only function in there that anything
> > > calls is snd_msndmidi_input_read() called by msnd_pinnacle.c but that
> > > is guarded by a check:
> > > 
> > >   146    if (chip->msndmidi_mpu)
> > >   147          snd_msndmidi_input_read(chip->msndmidi_mpu);   
> > > 
> > > but I don't think anything sets that msndmidi_mpu, since the only
> > > thing that could is snd_msndmidi_new() which isn't called.
> > > 
> > > I see that the original poster didn't test the external midi:
> > >    https://mailman.alsa-project.org/hyperkitty/list/alsa-devel@alsa-project.org/message/CWPYLPLJQEK64UU3YFCAMVXGDY42QKF2/
> > > so I guess this has always been missing.
> > > 
> > > I don't have the hardware to test.
> > > 
> > > Thoughts?
> > 
> > Well, it's a very old code on an old interface, and if it's not used
> > (even because of a typo or an overlook), then it's basically no chance
> > to be used in future.  Let's rip off.
> 
> Ok, I'll cut a patch to remove snd_msndmidi_new() and then probably the whole
> of msnd_midi.c and the call in msnd_pinnacle.c

Patch sent, see message: 20250511172957.1001583-1-linux@treblig.org

Thanks,

Dave

> Dave
> 
> > 
> > thanks,
> > 
> > Takashi
> > 
> -- 
>  -----Open up your eyes, open up your mind, open up your code -------   
> / Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
> \        dave @ treblig.org |                               | In Hex /
>  \ _________________________|_____ http://www.treblig.org   |_______/
> 
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-11 17:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-08 11:36 question on sound/isa/msnd/msnd_midi.c Dr. David Alan Gilbert
2025-05-11 14:13 ` Takashi Iwai
2025-05-11 16:47   ` Dr. David Alan Gilbert
2025-05-11 17:31     ` Dr. David Alan Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).