Issues:
- With a running JACK with enabled alsa_midi driver (-X alsa_midi), plugging in
a new MIDI device has no effect, e.g. no corresponding JACK ports are spawned
- With a running JACK with enabled alsa_midi driver (-X alsa_midi), deplugging
a MIDI device has no effect, e.g. the corresponding JACK ports stay around
Result:
- JACK only creates JACK ports of ALSA MIDI clients/ports found at startup
- JACK has to be restarted for any ALSA MIDI device (de)enumeration to take
place
Problem:
- There are some functions defined which actually should accomplish this in the
alsa_midi driver code (e.g. 'a2j_update_ports' and 'a2j_free_ports'), but they
are not called from any other function ;-)
Solution:
- Discriminate properly between ALSA PORT_START and PORT_CHANGE events
- 'a2j_new_ports' function has been added which recycles some code from
'alsa_input_thread'
- Actually call the already existing hot(de)plugging infrastructure
- 'a2j_update_ports' and 'a2j_new_ports' get called from the
'alsa_input_thread'
- 'a2j_free_ports' gets called from 'alsa_output_thread'
- 'alsa_out_thread' is woken up by 'a2j_jack_process_internal'
- Cleanup code that is not used:
- 'port_add' ringbuffer has no function, as 'new_ports' ringbuffer seems to be
implemented to accomplish the same
Signed-off-by: Hanspeter Portner <dev@open-music-kontrollers.ch>
- jack_remove_properties and jack_get_properties both search the metadata database for matching UUID string.
- However, they both fail at finding any matching UUIDs ever.
- The UUID string in the database are correctly created on a previously cleared buffer (e.g. memset to 0).
- The temporaty UUID string in the search routines however are not created on a cleared buffer, the end of the buffer thus may contain anything.
- As in the matching routine the complete UUID strings are compared (with size JACK_UUID_STRING_SIZE), there will never be a matching air, even if their valid part do match.
ensures that frame time will reflect any
discontinuity in processing (xrun or skipped cycles). It also cleans up
the code related to maintaining the DLL and frame time a bit, all of it
is now together in jack_run_cycle() and the logic behind it is easy to
follow.
The 'delayed_usecs' argument to jack_run_cycle() is now probably
redundant, the value computed locally (the 'dus' variable) is in
all cases more accurate than what the backend can provide.
Without cycle counting, CPU scaling isn't necessarily bad anymore, so we
don't have to worry the user.
The purpose of this commit is to get rid of JACK_TIMER_CYCLE_COUNTER.
The cycle counting clock is no longer supported. For backwards
compatibility with scripts, allow the user to request the cycle clock on
the command line, but use the system clock instead.
We have a proper clocksource in the kernel, use this instead.
This commit also fixes jackd on ARM boards with newer Linux kernels
where /proc/cpuinfo has changed.