* Adding new (old) SNDRV_SEQ_PORT_TYPE_MIDI_* defines
@ 2015-03-13 0:36 Adam Goode
2015-03-13 7:53 ` Takashi Iwai
2015-03-13 8:07 ` Clemens Ladisch
0 siblings, 2 replies; 4+ messages in thread
From: Adam Goode @ 2015-03-13 0:36 UTC (permalink / raw)
To: alsa-devel
Hi,
I found the /* TODO: read port flags from descriptors */ in
sound/usb/midi.c and was thinking about what to do to implement this.
The first thing to do would be to ensure that all the flags from the
element descriptors in the USB MIDI standard are available for returning
from snd_seq_port_info_get_type.
USB MIDI (see page 23):
http://www.usb.org/developers/docs/devclass_docs/midi10.pdf
I propose adding these flags to ALSA:
#define SNDRV_SEQ_PORT_TYPE_MIDI_CLOCK (1<<7) /* MIDI CLOCK compatible
device */
#define SNDRV_SEQ_PORT_TYPE_MIDI_TIME_CODE (1<<8) /* MTC compatible device
*/
#define SNDRV_SEQ_PORT_TYPE_MIDI_MACHINE_CONTROL (1<<9) /* MMC compatible
device */
#define SNDRV_SEQ_PORT_TYPE_MIDI_EFX (1<<21) /* Audio effects processor
device */
#define SNDRV_SEQ_PORT_TYPE_MIDI_PATCH_BAY (1<<22) /* MIDI patcher or
router device */
#define SNDRV_SEQ_PORT_TYPE_MIDI_DLS1 (1<<23) /* DownLoadable Sounds
Standard Level 1 compatible device */
#define SNDRV_SEQ_PORT_TYPE_MIDI_DLS2 (1<<24) /* DownLoadable Sounds
Standard Level 2 compatible device */
Thoughts? I can send a couple patches for the kernel and alsa-lib. I don't
think this is a breaking change.
Thanks,
Adam
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Adding new (old) SNDRV_SEQ_PORT_TYPE_MIDI_* defines
2015-03-13 0:36 Adding new (old) SNDRV_SEQ_PORT_TYPE_MIDI_* defines Adam Goode
@ 2015-03-13 7:53 ` Takashi Iwai
2015-03-13 8:07 ` Clemens Ladisch
1 sibling, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2015-03-13 7:53 UTC (permalink / raw)
To: Adam Goode; +Cc: alsa-devel
At Thu, 12 Mar 2015 20:36:19 -0400,
Adam Goode wrote:
>
> Hi,
>
> I found the /* TODO: read port flags from descriptors */ in
> sound/usb/midi.c and was thinking about what to do to implement this.
>
> The first thing to do would be to ensure that all the flags from the
> element descriptors in the USB MIDI standard are available for returning
> from snd_seq_port_info_get_type.
>
> USB MIDI (see page 23):
> http://www.usb.org/developers/docs/devclass_docs/midi10.pdf
>
> I propose adding these flags to ALSA:
>
> #define SNDRV_SEQ_PORT_TYPE_MIDI_CLOCK (1<<7) /* MIDI CLOCK compatible
> device */
> #define SNDRV_SEQ_PORT_TYPE_MIDI_TIME_CODE (1<<8) /* MTC compatible device
> */
> #define SNDRV_SEQ_PORT_TYPE_MIDI_MACHINE_CONTROL (1<<9) /* MMC compatible
> device */
> #define SNDRV_SEQ_PORT_TYPE_MIDI_EFX (1<<21) /* Audio effects processor
> device */
> #define SNDRV_SEQ_PORT_TYPE_MIDI_PATCH_BAY (1<<22) /* MIDI patcher or
> router device */
> #define SNDRV_SEQ_PORT_TYPE_MIDI_DLS1 (1<<23) /* DownLoadable Sounds
> Standard Level 1 compatible device */
> #define SNDRV_SEQ_PORT_TYPE_MIDI_DLS2 (1<<24) /* DownLoadable Sounds
> Standard Level 2 compatible device */
>
>
> Thoughts? I can send a couple patches for the kernel and alsa-lib. I don't
> think this is a breaking change.
I'm fine with this extension (as long as it's tested :)
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Adding new (old) SNDRV_SEQ_PORT_TYPE_MIDI_* defines
2015-03-13 0:36 Adding new (old) SNDRV_SEQ_PORT_TYPE_MIDI_* defines Adam Goode
2015-03-13 7:53 ` Takashi Iwai
@ 2015-03-13 8:07 ` Clemens Ladisch
2015-03-13 14:11 ` Adam Goode
1 sibling, 1 reply; 4+ messages in thread
From: Clemens Ladisch @ 2015-03-13 8:07 UTC (permalink / raw)
To: Adam Goode, alsa-devel
Adam Goode wrote:
> I found the /* TODO: read port flags from descriptors */ in
> sound/usb/midi.c and was thinking about what to do to implement this.
>
> The first thing to do would be to ensure that all the flags from the
> element descriptors in the USB MIDI standard are available for returning
> from snd_seq_port_info_get_type.
I don't know of any class-compliant USB MIDI device that actually has
elements and declares them in its descriptors.
Do you have anything that would allow us to test this?
> I propose adding these flags to ALSA:
>
> #define SNDRV_SEQ_PORT_TYPE_MIDI_CLOCK (1<<7) /* MIDI CLOCK compatible device */
> #define SNDRV_SEQ_PORT_TYPE_MIDI_TIME_CODE (1<<8) /* MTC compatible device */
> #define SNDRV_SEQ_PORT_TYPE_MIDI_MACHINE_CONTROL (1<<9) /* MMC compatible device */
> #define SNDRV_SEQ_PORT_TYPE_MIDI_EFX (1<<21) /* Audio effects processor device */
> #define SNDRV_SEQ_PORT_TYPE_MIDI_PATCH_BAY (1<<22) /* MIDI patcher or router device */
> #define SNDRV_SEQ_PORT_TYPE_MIDI_DLS1 (1<<23) /* DownLoadable Sounds Standard Level 1 compatible device */
> #define SNDRV_SEQ_PORT_TYPE_MIDI_DLS2 (1<<24) /* DownLoadable Sounds Standard Level 2 compatible device */
>
> Thoughts? I can send a couple patches for the kernel and alsa-lib. I don't
> think this is a breaking change.
The first three flags might be useful. Their problem is that software
cannot rely on them being set for all ports connected to devices that
support these features, but the other PORT_TYPE_MIDI flags have the same
problem.
I don't see any useful application for the other four flags. I think
the driver should just ignore them.
Regards,
Clemens
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Adding new (old) SNDRV_SEQ_PORT_TYPE_MIDI_* defines
2015-03-13 8:07 ` Clemens Ladisch
@ 2015-03-13 14:11 ` Adam Goode
0 siblings, 0 replies; 4+ messages in thread
From: Adam Goode @ 2015-03-13 14:11 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel
On Fri, Mar 13, 2015 at 4:07 AM, Clemens Ladisch <clemens@ladisch.de> wrote:
> Adam Goode wrote:
> > I found the /* TODO: read port flags from descriptors */ in
> > sound/usb/midi.c and was thinking about what to do to implement this.
> >
> > The first thing to do would be to ensure that all the flags from the
> > element descriptors in the USB MIDI standard are available for returning
> > from snd_seq_port_info_get_type.
>
> I don't know of any class-compliant USB MIDI device that actually has
> elements and declares them in its descriptors.
>
> Do you have anything that would allow us to test this?
>
> > I propose adding these flags to ALSA:
> >
> > #define SNDRV_SEQ_PORT_TYPE_MIDI_CLOCK (1<<7) /* MIDI CLOCK compatible
> device */
> > #define SNDRV_SEQ_PORT_TYPE_MIDI_TIME_CODE (1<<8) /* MTC compatible
> device */
> > #define SNDRV_SEQ_PORT_TYPE_MIDI_MACHINE_CONTROL (1<<9) /* MMC
> compatible device */
> > #define SNDRV_SEQ_PORT_TYPE_MIDI_EFX (1<<21) /* Audio effects
> processor device */
> > #define SNDRV_SEQ_PORT_TYPE_MIDI_PATCH_BAY (1<<22) /* MIDI patcher or
> router device */
> > #define SNDRV_SEQ_PORT_TYPE_MIDI_DLS1 (1<<23) /* DownLoadable Sounds
> Standard Level 1 compatible device */
> > #define SNDRV_SEQ_PORT_TYPE_MIDI_DLS2 (1<<24) /* DownLoadable Sounds
> Standard Level 2 compatible device */
> >
> > Thoughts? I can send a couple patches for the kernel and alsa-lib. I
> don't
> > think this is a breaking change.
>
> The first three flags might be useful. Their problem is that software
> cannot rely on them being set for all ports connected to devices that
> support these features, but the other PORT_TYPE_MIDI flags have the same
> problem.
>
> I don't see any useful application for the other four flags. I think
> the driver should just ignore them.
>
Hmm, it would be nice to be able to expose all the descriptors the hardware
is providing. But I do worry about polluting this bitmap with all these
flags. I'll have to think about this a little more.
Thanks,
Adam
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-13 14:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-13 0:36 Adding new (old) SNDRV_SEQ_PORT_TYPE_MIDI_* defines Adam Goode
2015-03-13 7:53 ` Takashi Iwai
2015-03-13 8:07 ` Clemens Ladisch
2015-03-13 14:11 ` Adam Goode
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.