Skip to contentSkip to conversation

Ego Sys, Miditerminal 4140 Driver

DISCUSSION Matthias König 2 participants 5 messages Mar 30, 2006 – Apr 5, 2006

lore
Share & tools
lore
#0 lore raw

Hello alsa-devel,

I own a Miditerminal 4140 by ESI, which is a 4 In 4 Out Midi interface with SMPTE timecode generation for the parallel port. Since I want this device to work under Linux, I've been working on a driver for ALSA.
It seems that I have some success now. At least I can receive and transmit Midi bytes on all 4 In/Out ports. Maybe someone with more experience in driver development could take a look at the driver? A preliminary version is available from www.phasorlab.de/alsa/mts64.tar.bz2
Any comments and critics would be highly appreciated.

There is still some work to do, the SMPTE timecode generation will need some kind of control for start/stop of timecode generation and setting the time (timecode generation is done by hardware). I'm not yet sure how to do this; can this be done by ALSA control elements or do I have to create a hwdep device, which would use ioctl? Again, suggestions would be welcome.

Regards,
Matthias

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#1 lore raw
Quoted 5 lines · Matthias K??nig

There is still some work to do, the SMPTE timecode generation will need some kind of control for start/stop of timecode generation and setting the time (timecode generation is done by hardware). I'm not yet sure how to do this; can this be done by ALSA control elements or do I have to create a hwdep device, which would use ioctl?

Most devices implement this as a separate control MIDI port for vendor- specific SysEx messages, where "implements" means that the hardware does it this way.

HTH
Clemens

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#2 lore raw

Hi Clemens,

Quoted 10 lines · Clemens Ladisch
Quoted 5 lines · Matthias K??nig

There is still some work to do, the SMPTE timecode generation will need some kind of control for start/stop of timecode generation and setting the time (timecode generation is done by hardware). I'm not yet sure how to do this; can this be done by ALSA control elements or do I have to create a hwdep device, which would use ioctl?

Most devices implement this as a separate control MIDI port for vendor- specific SysEx messages, where "implements" means that the hardware does it this way.

Thanks for this hint. The Windows driver of my device uses a dispatch control routine (the analogon to ioctl) for this purpose. So I thought this should be done evtl. by a hwdep device.
The separate Midiport will be more flexible, however in this case the driver will have to parse the Midi message, because the hardware is controlled by other means.

Regards,
Matthias

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#3 lore raw
Quoted 12 lines · Matthias Koenig
Quoted 10 lines · Clemens Ladisch
Quoted 5 lines · Matthias K??nig

There is still some work to do, the SMPTE timecode generation will need some kind of control for start/stop of timecode generation and setting the time (timecode generation is done by hardware). I'm not yet sure how to do this; can this be done by ALSA control elements or do I have to create a hwdep device, which would use ioctl?

Most devices implement this as a separate control MIDI port for vendor- specific SysEx messages, where "implements" means that the hardware does it this way.

Quoted 6 lines

Thanks for this hint. The Windows driver of my device uses a dispatch control routine (the analogon to ioctl) for this purpose. So I thought this should be done evtl. by a hwdep device.
The separate Midiport will be more flexible, however in this case the driver will have to parse the Midi message, because the hardware is controlled by other means.

Then you probably shouldn't use a MIDI port for this. Wrapping the control commands into some invented MIDI SysEx doesn't make sense if your driver just throws the wrapper away.

I think using control elements would work just fine.

HTH
Clemens

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#4 lore raw
Quoted 7 lines · Clemens Ladisch
Quoted 3 lines

The separate Midiport will be more flexible, however in this case the driver will have to parse the Midi message, because the hardware is controlled by other means.

Then you probably shouldn't use a MIDI port for this. Wrapping the control commands into some invented MIDI SysEx doesn't make sense if your driver just throws the wrapper away.

Well, it would make sense if there would be some standard to control SMPTE via MIDI messages.
However, I don't want to invent some random MIDI messages for this purpose (also I'm not in the position to do that). I did some tests with a wrapper port in the driver and used a MIDI Start/Continue/Stop and a MTC Full Frame SysEx message to set the time, which works but is probably not the desired thing.

Quoted 1 line

I think using control elements would work just fine.

Ok, I'll use control elements. Two questions:

What will the assigned interface for the controls be? SNDRV_CTL_ELEM_IFACE_RAWMIDI ?

I see, that there are some standards on the names of the control elements, however in this case this is not clear to me.
I need the following controls (with my name suggestions):

1. SMPTE switch: toggles generation of timecode
"SMPTE Playback Switch" Boolean
2-5. Setting the time

"SMPTE Time Hours"      Integer
"SMPTE Time Minutes"    Integer
"SMPTE Time Seconds"    Integer
"SMPTE Time Frames"     Integer 

6. Setting framerate
"SMPTE Fps" Enumerated

Are these names Ok for ALSA?

Regards,
Matthias

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642