Error opening raw midi port

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Error opening raw midi port

Fons Adriaensen-2
(Previously posted on 7 Feb, no replies)

There's a small problem with jack's raw alsa midi backend.
(0.109.2)

If any of the raw ports is alread in use the backend gets into
an endless loop trying to open it:

JACK compiled with System V SHM support.
loading driver ..
apparent rate = 48000
creating alsa driver ... hw:1|hw:1|256|2|48000|0|0|nomon|swmeter|-|32bit
control device hw:1
configuring for 48000Hz, period = 256 frames (5.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit little-endian
ALSA: use 2 periods for playback
scan: added port hw:1,0,0 in-hw-1-0-0--MIDI-1
scan: added port hw:1,0,0 out-hw-1-0-0--MIDI-1
scan: added port hw:1,1,0 in-hw-1-1-0--MIDI-2
scan: added port hw:1,1,0 out-hw-1-1-0--MIDI-2
ALSA lib rawmidi_hw.c:233:(snd_rawmidi_hw_open) open /dev/snd/midiC1D0 failed: Device or resource busy
scan: can't open port  
scan: added port hw:1,0,0 in-hw-1-0-0--MIDI-1
scan: added port hw:1,0,0 out-hw-1-0-0--MIDI-1
scan: added port hw:1,1,0 in-hw-1-1-0--MIDI-2
scan: added port hw:1,1,0 out-hw-1-1-0--MIDI-2
ALSA lib rawmidi_hw.c:233:(snd_rawmidi_hw_open) open /dev/snd/midiC1D0 failed: Device or resource busy
scan: can't open port  

etc. etc.

In this case the port is in use by a daemon and should just not be
used by jack.

--
FA

Laboratorio di Acustica ed Elettroacustica
Parma, Italia

Wie der Mond heute Nacht aussieht !
Ist es nicht ein seltsames Bild ?

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: Error opening raw midi port

Marc-Olivier Barre-3
On Thu, Mar 27, 2008 at 3:49 PM, Fons Adriaensen <[hidden email]> wrote:
> (Previously posted on 7 Feb, no replies)
>
>  There's a small problem with jack's raw alsa midi backend.
>  (0.109.2)

Ticket #35 has been opened. You can track progress here
http://trac.jackaudio.org/jack/ticket/35, and just so you know, it's a
milestone before 1.0, so it'll get fixed :-)

Cheers,
__________________
Marc-Olivier Barre,
MarcO'Chapeau.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: Error opening raw midi port

Dmitry Baikov
On Thu, Mar 27, 2008 at 9:19 PM, Marc-Olivier Barre
<[hidden email]> wrote:
> On Thu, Mar 27, 2008 at 3:49 PM, Fons Adriaensen <[hidden email]> wrote:
>  > (Previously posted on 7 Feb, no replies)
>  >
>  >  There's a small problem with jack's raw alsa midi backend.
>  >  (0.109.2)
>
>  Ticket #35 has been opened. You can track progress here
>  http://trac.jackaudio.org/jack/ticket/35, and just so you know, it's a
>  milestone before 1.0, so it'll get fixed :-)

I am working on a solution at the moment.

It would be great to get Trac access ;)


Dmitry.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: Error opening raw midi port

Fons Adriaensen-2
On Thu, Mar 27, 2008 at 11:32:55PM +0300, Dmitry Baikov wrote:

> I am working on a solution at the moment.

Great, thanks.

I've been trying to understand what's actually happening.

It's easy enough to get rid of the repeated errors - just
set the poll timeout in scan_thread() to -1. But I guess
the loop is there to find new hotplugged devices as they
are plugged in (and to handle termination).

But then - and here either I read things wrong or I don't
grok it a all - it seems that all raw ports are closed
and re-opened every two seconds... Which is probably not
what was intended...

Ciao,

--
FA

Laboratorio di Acustica ed Elettroacustica
Parma, Italia

Lascia la spina, cogli la rosa.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: Error opening raw midi port

Dmitry Baikov
On Thu, Mar 27, 2008 at 11:55 PM, Fons Adriaensen <[hidden email]> wrote:
>  Great, thanks.
Commited as 1138.

>  I've been trying to understand what's actually happening.
If the port could not be opened it was removed from the list, and then
next scan loop would find it again and try to open....
Finally used PORT_ZOMBIFIED state, which was introduced for this very purpose,
but seems I forgot to use it then.

>  the loop is there to find new hotplugged devices as they
>  are plugged in (and to handle termination).
Yes.

>  it seems that all raw ports are closed
>  and re-opened every two seconds...
No. Logs tell everything :)

If you are really interested, I can write a more detailed answer.

Regards,
Dmitry.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: Error opening raw midi port

Fons Adriaensen-2
On Fri, Mar 28, 2008 at 12:08:06AM +0300, Dmitry Baikov wrote:

> Commited as 1138.

Just returned from our lab (where we had this problem)
The changes in svn 1138 solve it perfectly. Many thanks.

Maybe the 'zombified' message is a bit too strong - there
is actually nothing wrong with the device that can't be
opened, it's just busy.

Ciao,

--
FA

Laboratorio di Acustica ed Elettroacustica
Parma, Italia

Lascia la spina, cogli la rosa.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: Error opening raw midi port

Dmitry Baikov
On Fri, Mar 28, 2008 at 3:39 PM, Fons Adriaensen <[hidden email]> wrote:
>  Maybe the 'zombified' message is a bit too strong - there
>  is actually nothing wrong with the device that can't be
>  opened, it's just busy.

Uhhh, right! I forgot that many people will see it. Will fix when I get home.


Dmitry.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel