Commit Graph

567 Commits

Author SHA1 Message Date
Nedko Arnaudov e1202d714b linux/alsa/alsa_rawmidi.c: Fix potential snprintf() truncation 2023-08-29 22:35:31 +03:00
Nedko Arnaudov e60d202fd1 linux/alsa/alsa_rawmidi.c: Adjust default port metadata
See also b83d2340a5
2023-08-29 22:34:49 +03:00
Nedko Arnaudov 59a8aad4e1 Merge jackaudio/develop into LADI/main 2023-08-29 21:40:09 +03:00
Albert Graef b83d2340a5
Jack MIDI portnames (fixes #944) (#945)
* Rework the seqmidi aliases.

- The 1st alias is now the Jack1 MIDI port name with alsa_midi prefix.

- This 2nd alias is basically the same as the 1st alias with the
  alsa_midi prefix stripped, so that devices are listed under the ALSA
  names.

Also fixed the "capture" and "playback" port type names which were the
wrong way round.

* Rework the rawmidi alias.

Like in alsa_seqmidi.c, the 1st alias is now the Jack1 MIDI port name
with alsa_midi prefix.

* Rework pretty-name metadata.

The rawmidi and seqmidi pretty-name metadata now uses the same Jack1
port name as the 1st alias, without the alsa_midi: prefix.
2023-08-29 16:07:54 +02:00
Nedko Arnaudov 014e2000c5 linux/alsa/alsa_rawmidi.c: Adjust port aliases to match these of linux/alsarawmidi/* 2023-07-23 20:52:10 +03:00
Nedko Arnaudov 25d398b580 linux/alsa/alsa_rawmidi.c: Add my copyright line 2023-07-19 00:57:48 +03:00
Nedko Arnaudov 1dcc489e04 linux/alsarawmidi: adjust alsarawmidi driver aliases 2023-07-19 00:56:07 +03:00
Nedko Arnaudov 7342f76922 linux/alsa/alsa_seqmidi.c: adjust alias prefix to alsa_midi:
This is partial cherry-pick of https://github.com/agraef/jack2
commit 71c9e64019a45c363cfedfec5f3ff9d5f2d9a1cc

Kudos to @agraef
2023-07-19 00:05:59 +03:00
Nedko Arnaudov c5b3bf222c linux/alsa/alsa_rawmidi.c: Adjust port aliases to match alsa_pcm naming scheme 2023-07-18 23:41:58 +03:00
Nedko Arnaudov 4a125dcfbb linux/alsa/alsa_rawmidi.c: Use string id in alias
This commit also renames the name member to alias, so to match reality.
The alias max size was extended to 4096 bytes (jack port registration limitations still aplly)
2023-07-18 23:17:20 +03:00
Claudio Cabral 719fa1d545 Add 32 bit support for ALSA driver (#811)
* apply changes without whitespace

* remove neon intrinsics and fix indentation

* update float_32 macro and fix misspellings

* check msbits to determine number of bits in alsa driver

* add better error messages and support for SND_PCM_FORMAT_S32_BE

* log when sample format is not equal to bits

Co-authored-by: Claudio Cabral <clca@bang-olufsen.dk>
Co-authored-by: Claudio Cabral <cl@udio.co>
2022-01-15 15:09:56 +00:00
Camille Gonnet 8d51e9a005 ALSA: convert properly S24_LE 2022-01-15 15:09:55 +00:00
falkTX 365b7e3f05
Cleanup around linux futex, apply EINTR case for timed waits
Signed-off-by: falkTX <falktx@falktx.com>
2021-04-14 17:05:28 +01:00
chzchzchz 01f0dabd14 JackLinuxFutex: treat maximum TimedWait() as Wait() and retry on EINTR
FUTEX_WAIT may be interrupted by a signal and return EINTR. If a client
process takes a signal while on the futex, the jack client may error out
with no way to recover despite the signal being safe. Instead, retry if
errno is set to EINTR.
2021-04-14 16:20:02 +01:00
Khem Raj 57aa8ad346 Use SYS_futex instead of __NR_futex
SYS_futex is expected from system C library.
in glibc (/usr/include/bits/syscall.h defines it in terms of of NR_futex)
rv32 is using 64bit time_t from get go unlike other 32bit architectures
in glibc, therefore it wont have NR_futex defined but just NR_futex_time64
this aliases it to NR_futex so that SYS_futex is then defined for rv32

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-11-27 17:55:38 +01:00
Adam Miartus 87da6c7d38 jack alsa: reoganize code for readability
Change-Id: I3d79e5f2516d8709b70dc700e5c9a04534619661
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit 7a7d3b3524877533c0d5a9d3490d862d4323d280)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
2020-10-11 22:43:49 +02:00
Adam Miartus 4f8849bdc6 alsa_driver: remove unused variable
Change-Id: I98fc02a877a830d375b458f0346fc9a43993e72c
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
2020-10-11 22:42:51 +02:00
falkTX dedf85e95a
Revert "alsa: fix the poll interval"
This reverts commit d9f84dcca3.
2020-09-13 00:47:33 +01:00
falkTX 17574b4634
Revert "Remove `floor` call in timeout calculation"
This reverts commit 0393da5868.
2020-09-13 00:46:47 +01:00
falkTX 9455cea656
Revert "Fix integer conversion for poll_timeout_ms"
This reverts commit 0e5f15dbda.
2020-09-13 00:46:33 +01:00
falkTX 0e5f15dbda
Fix integer conversion for poll_timeout_ms
Signed-off-by: falkTX <falktx@falktx.com>
2020-07-16 20:24:26 +01:00
falkTX 0393da5868
Remove `floor` call in timeout calculation
See #614

Signed-off-by: falkTX <falktx@falktx.com>
2020-07-16 13:43:43 +01:00
Adam Miartus 994ebbc6ee alsa: in case of poll timeout print error
This is always an audible issue. Therefore print the coresponding
error message also in non verbose mode.

Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit 5b8c373318382183b0ec08a2a450cdfe75937892)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>

Change-Id: I5e1380776f76814409f198a4ad874d4ae46007e3
2020-06-11 11:17:34 +02:00
Adam Miartus 1180f86400 alsa: add log in case of poll was interrupted
poll may be interrupted due to signal, in that case print
error log

Change-Id: I1b2b2543a4b056b50af7617efc80fe517bddaaae
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit 20883aa404c3d5eb0370eaa8ab2337f3b95c1bf9)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
2020-06-11 11:16:48 +02:00
Adam Miartus d9f84dcca3 alsa: fix the poll interval
should be set in milliseconds

Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit 17031895ded6a1d53a3b851059134d11f12c9ce6)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>

Change-Id: I3d32e4602c1bdf15474b14496173727aa130c924
2020-06-10 23:18:05 +02:00
Adam Miartus 4d251434e8 alsa: fix typo in error output
Change-Id: I45e1ccf2e1b955db187eb72127a536fe5eb0b81e
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit 865cad2003b57e8dd175636a5d7070a4a470e3ac)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
2020-06-10 22:37:29 +02:00
Adam Miartus b2d9868550 alsa: fix define conflict with std algorithm
Change-Id: If3582834e0ca33bf36203a38fe7fd262d96a6827
Signed-off-by: Adam Miartus <external.adam.miartus@de.bosch.com>
2020-06-10 22:31:35 +02:00
Guido Aulisi a71bc0b75a Fix warning: catching polymorphic type ‘class std::exception’ by value 2019-10-28 11:25:42 +01:00
Luciano Iam a5093f06ca Rename PortSetDeviceMetadata to PortSetDefaultMetadata 2019-10-28 11:24:12 +01:00
falkTX f19176657c Fix blocking DBus device reservation, so it plays nice with others 2019-10-28 11:16:09 +01:00
falkTX 37250ff470
Use strncpy in some calls for alsa_rawmidi.c
Signed-off-by: falkTX <falktx@falktx.com>
2019-10-06 23:02:59 +01:00
Luciano Iam ab536f67bc Rename system_midi:* back to system:midi_* 2019-10-05 21:27:37 +01:00
Luciano Iam 0f015fc53b Set pretty-name for ALSA seq MIDI ports 2019-10-05 21:27:37 +01:00
Luciano Iam a11fa07e5e Set pretty-name for ALSA raw MIDI ports 2019-10-05 21:27:37 +01:00
falkTX c8fd3f6a0f
Set "seq" alsa midi driver to maximum resolution possible
Signed-off-by: falkTX <falktx@falktx.com>
2019-10-05 21:17:42 +01:00
Laxmi Devi 4341f8086f alsa_driver: Execute recovery on ALSA poll timeout
On ALSA poll time out, retry polling after executing the recovery.
Retry max limit is set with MAX_RETRY_COUNT.

Signed-off-by: Laxmi Devi <Laxmi.Devi@in.bosch.com>
2019-09-11 19:25:50 +01:00
Laxmi Devi 45ab755883 alsa_driver: Moved the check for poll timeout before getting the revents
Currently only poll_result is checked for < 0 before doing the further
processing, and not for timeout. After this movement the revents is checked
only if the poll doesn't timeout.


Signed-off-by: Laxmi Devi <Laxmi.Devi@in.bosch.com>
2019-09-11 19:25:50 +01:00
Laxmi Devi fb11c75fdc alsa_driver: Exiting loop for need_playback and need_capture on XRUN to execute recovery
Currently even on XRUN, the xrun recovery is not executed as the
need_playback or need_capture flag is still true and so it goes
and waits on poll again.

Signed-off-by: Laxmi Devi <Laxmi.Devi@in.bosch.com>
2019-09-11 19:22:28 +01:00
luz.paz a93b210134 FIx doxygen and user facing and non-facing typos
Found via `codespell -q 3`
2019-09-11 19:17:07 +01:00
falkTX bb416c7801 Rename `PortSetDeviceName` to `PortSetDeviceMetadata` 2019-09-11 19:13:56 +01:00
Luciano Iam c2ec4b37d4 MIDI port pretty names (#498)
* Set MIDI port pretty names on macOS

* Set MIDI port pretty names on Windows

* Set MIDI port pretty names on Linux/alsarawmidi

* Update alsarawmidi port naming to match CoreMIDI and WinMME

* Rename PortSetPrettyNameProperty to PortSetDeviceName

* Set hardware property to MIDI port names
2019-09-11 19:09:59 +01:00
falkTX a24777a16c
Use CLOCK_MONOTONIC_RAW when available
Signed-off-by: falkTX <falktx@falktx.com>
2019-06-02 20:21:50 +02:00
Arnout Diels 487632577d Changed jackd alsa driver to reprepare the kernel alsa driver upon each xrun 2019-03-22 12:52:07 +01:00
Filipe Coelho 59550f67ee
Fix client UUID gen, and some warnings (#440)
* Fix generation of client uuid

Signed-off-by: falkTX <falktx@falktx.com>

* Remove all client properties when removed; Cleanup a few things

Signed-off-by: falkTX <falktx@falktx.com>

* Make all uuid function arguments use jack_uuid_t type; Fix warnings

Signed-off-by: falkTX <falktx@falktx.com>

* Rework uuids to never be int, more cleanup

Signed-off-by: falkTX <falktx@falktx.com>
2019-03-18 08:33:50 +01:00
shura bb3f5cb296 Solving problems while compiling jack2 on macOS X with dbus support (#434)
* Solving problems while compiling jack2 on macOS X with dbus support

* Using the right function name in uptime error
2019-02-24 18:09:47 +01:00
Rui Nuno Capela 05bc08c64e memops-alsa_bad_sound-fix-1 (#426)
* Revert "oss_driver: Use float to S32 conversion if requested"

This reverts commit c5a0f5ea1c.

* Revert "alsa_in/out: Use float to S32 conversion if requested"

This reverts commit 148c8d8e6a.

* Revert "alsa_driver: Use float to S32 conversion if requested"

This reverts commit d017e1fffe.

* Revert "memops: Provide function for float to S32 conversion"

This reverts commit bb99e09b99.

* Revert "memops: Align S24LE and S32LE to float conversion"

This reverts commit b4ea23df6a.

* Revert "memops: Provide function for S32 to float conversion"

This reverts commit 244fc27e29.

* Revert "memops: Align float to S24LE and S32LE conversion"

This reverts commit 4455fe020c.

* Revert "memops: Remove not used conversion macros"

This reverts commit a82f3f2fb4.

* Revert "memops: Use right-aligned S24LE to float conversion"

This reverts commit e753254313.

* Revert "memops: Use right-aligned float to S24LE conversion"

This reverts commit 831163e516.
2019-02-08 22:22:53 +01:00
Thomas Brand 6d2302a803 Remove FreeBoB backend (superseded by FFADO)
The FreeBoB project was renamed to FFADO in 2007.
All users should use the FFADO backend by now (2019).

Backend name to be removed: "freebob"
Alternative backend to use: "firewire"

Please check the jackd manpage for details about "firewire" backend.

This commit is part of legacy cleanup.

closes issue #365.
2019-01-22 20:13:08 +01:00
Timo Wischer d017e1fffe alsa_driver: Use float to S32 conversion if requested
sample_move_d32u24_sS() converts into samples like 0x00****** but S32
format expects samples like 0x********. Therefore it will not use the
full volume range when also using sample_move_d32u24_sS() for S32.

Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
2019-01-17 00:56:39 +01:00
falkTX 53f1a87bdf
Revert a test change.
Sorry!

Signed-off-by: falkTX <falktx@gmail.com>
2018-11-13 23:06:00 +01:00
falkTX 7dfdbe133a
Cleanup some warnings
Signed-off-by: falkTX <falktx@gmail.com>
2018-11-13 23:01:23 +01:00