Max Kellermann
bca9e3e347
io/uring/Queue: dispatch all completions in SubmitAndWaitDispatchOneCompletion()
...
io_uring_submit_and_wait_timeout() can return multiple completions,
even if we wait for only one. We should dispatch them all or we miss
wakeups.
2025-02-13 14:53:30 +01:00
Max Kellermann
2276ebd70f
io/uring/Queue: add DispatchCompletions() overload using io_uring_for_each_cqe()
2025-02-13 14:53:24 +01:00
Max Kellermann
a9bee1c64b
io/uring/Ring: add io_uring_for_each_cqe() wrapper
2025-02-13 14:53:17 +01:00
Max Kellermann
c8e88408b2
io/uring/Ring: ignore EINTR
2025-02-13 14:53:11 +01:00
Max Kellermann
45644759fe
io/uring/CancellableOperation: invoke OnUringCompletion() in destructor
...
This is important for operations that have complex cancellation
procedures (e.g. if they need to free buffers). They might leave an
Operation instance in the queue.
2025-02-13 14:52:52 +01:00
Max Kellermann
e014d31972
io/uring/Ring: add io_uring_submit_and_wait_timeout() wrapper
2025-02-13 14:52:37 +01:00
Max Kellermann
b7655d38f7
io/uring/Queue: support IORING_CQE_F_MORE
2025-02-13 14:52:30 +01:00
Max Kellermann
268f737ac4
meson.build: suppress -Wmissing-field-initializers
...
There's nothing wrong with initializing only some fields.
2025-02-13 14:21:38 +01:00
Max Kellermann
80ff0a062a
system/EpollFD: add method GetFileDescriptor()
2025-02-13 14:19:28 +01:00
Max Kellermann
24bcf44a47
subprojects: update sqlite to 3.49.0-1
2025-02-13 14:12:53 +01:00
gd
f1e43cb498
android: Loader - load early (before service thread) both in activity and service.
...
Loader converted from java to kotlin.
Instead of loading libmpd when the service thread is started,
the service will not start the the thread if libmpd failed to load.
The loader is also accessed by the view data to let
the ui adjust if failed to load, by showing the failure reason
and disabling the Start MPD button.
2025-02-06 14:23:26 +02:00
gd
ae1c5e3424
android: build.gradle - added build flavor "fail-test" to test System.loadLibrary("mpd") failure
2025-02-06 14:11:06 +02:00
gd
9eb5879542
android: IntentUtils - added license comment
2025-02-06 14:06:53 +02:00
gd
038759506f
android: added 'universal' flavor that includes both both arm64-v8a and x86_64 versions of libmpd.so
2025-02-05 20:31:43 +02:00
gd
2bf9fdf10e
android: migrated build to version catalogs
...
For easier management of dependencies versions: https://developer.android.com/build/migrate-to-catalogs
2025-02-05 20:15:58 +02:00
gd
0bf77f4eb3
android: converted Main from java to kotlin
2025-02-05 11:20:39 +02:00
gd
034bcf4f44
android: added product flavors to separatly build apk for arm64-v8a or x86_64
2025-02-04 10:23:26 +02:00
gd
834d6dcf46
android: build version of kotlin and compose updated.
...
Changed to compatible versions according to https://developer.android.com/jetpack/androidx/releases/compose-kotlin#kts
2025-02-04 10:22:57 +02:00
gd
8a642c8a83
android: MainScreen - use Icons.AutoMirrored.Filled.List instead of deprecated Icons.Default.List
2025-02-04 10:22:57 +02:00
gd
fe42ad2439
android: .gitignore - added previously misspelled app/src/main/jniLibs/
2025-02-04 10:22:57 +02:00
gd
51242be72b
android: changed permissions handling UI in status screen when show rationale is false
...
Android will ignore permission request and will not show the request dialog
if the user's action implies "don't ask again."
This leaves the app in a crippled state and the user confused.
Google says "don't try to convince the user", so it returns false for `shouldShowRequestPermissionRationale`.
To help the user proceed, we show the `Request permission` button only if `shouldShowRequestPermissionRationale == true`
because there's a good chance the premission request dialog will not be ignored.
If `shouldShowRequestPermissionRationale == false` we instead show the "rationale" message and a button to open
the app info dialog where the user can explicitly grand the permission.
2025-02-04 10:22:57 +02:00
gd
cb62aff43e
android: added missing package declaration in SettingsScreen.kt
2025-02-04 10:22:57 +02:00
gd
491e726540
android: manifest - added sdk version to legacy permission READ_EXTERNAL_STORAGE, added permission READ_MEDIA_AUDIO
...
Change fo r SDK version 33 and above
2025-02-04 10:22:57 +02:00
gd
7404be41dc
android: git ignoring .idea directory completely until a good reason emerges not to
2025-02-04 10:22:57 +02:00
Camille Scholtz
b8289ae923
input/meson.build: Add missing dependency
2025-02-03 23:07:58 +01:00
Max Kellermann
6b92b7adb9
util/PacketBigEndian: add operator|
2025-02-01 19:30:17 +01:00
Max Kellermann
00a352ffcd
event/Loop: explicit io_uring initialization
...
Log the io_uring initialization error at MPD startup.
2025-02-01 19:20:50 +01:00
Max Kellermann
63cc07b8a7
event/Loop: add method SetThread()
...
Require to call it before calling Run(); remove the setter from Run().
This gives class EventThread more control over when it is initialized.
2025-02-01 19:19:59 +01:00
Max Kellermann
b2bf95009b
event/Thread: use inline initializers
2025-02-01 18:24:02 +01:00
gd
7df041310c
android: build.gradle.kts - updated dependencies versions. Updated compile sdk to 35, and target sdk to 34
2025-02-01 18:09:12 +01:00
gd
cd9522c1d1
android: manifest - added android:foregroundServiceType=mediaPlayback and permission FOREGROUND_SERVICE_MEDIA_PLAYBACK
...
Required by newer android sdk.
2025-02-01 18:09:07 +01:00
gd
59bd0fe0f0
android: added README.md for notes and resources for MPD android maintainers.
2025-02-01 18:09:02 +01:00
gd
0872a761c8
android: gradle build - add ndk.abiFilters to package the prebuilt arm64-v8a/libmpd.so with the apk
2025-02-01 18:08:58 +01:00
gd
996e158f56
android: updated gradle version
2025-02-01 18:08:55 +01:00
gd
7fb195bc0b
android: Context.cxx - in GetExternalFilesDir removed assert type != nullptr
...
May be null for the root of the files directory.
2025-02-01 18:08:52 +01:00
gd
2fabaa2e95
android: meson.build - changed output dir name from jnilibs to jniLibs
...
It is the default name: https://developer.android.com/studio/projects/gradle-external-native-builds#jniLibs
2025-02-01 18:08:48 +01:00
Camille Scholtz
e3cf9bb0a1
Fix deamon mode on macos
2025-02-01 18:05:49 +01:00
Camille Scholtz
407db96d4a
Install some more dependencies in the macos workflow
2025-02-01 18:05:42 +01:00
Camille Scholtz
3689200b78
Add prcr2 dependency to macos workflow
2025-02-01 18:05:34 +01:00
Camille Scholtz
6c16430a85
Remove whitespace
2025-02-01 18:05:24 +01:00
Camille Scholtz
ff37d11610
Workflow fixes for macOS
2025-02-01 18:05:17 +01:00
Camille Scholtz
509786cbf1
Revert "remove macOS support"
...
This reverts commit 518ce0187a
.
2025-02-01 18:05:13 +01:00
gd
f15b6a43d3
Logging: curl - write debug output through MPD log instead of curl writing directly to stderr.
...
The output gets the standard MPD log format with domain curl and a timestamp.
Using CURLOPT_DEBUGFUNCTION that is only called when CURLOPT_VERBOSE is in effect
when MPD log level is verbose.
2025-02-01 08:53:38 +02:00
Max Kellermann
bddfff9c2b
meson.build: fix typo
2025-01-31 19:51:00 +01:00
Max Kellermann
63ad12bb89
storage/nfs: MapUTF8("") returns the full URL including parameters
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2154
2025-01-30 20:04:19 +01:00
Max Kellermann
7c4ddb5943
input/uring: initialize uring_input_queue lazily
...
The BlockingCall() in InitUringInputPlugin() did not work because the
EventThread was not yet started. This was never noticed until commit
e309941646
which enabled `IORING_SETUP_SINGLE_ISSUER`, and suddenly
the kernel refused to accept io_uring_submit() calls from the
io_thread because io_uring_setup() had been called from the main
thread.
2025-01-30 20:00:57 +01:00
Max Kellermann
3cf5354e3f
Revert "Main: start IO threads before initializing the rest"
...
This reverts commit abc8420697
. This
was a bad idea, too, because it broke daemonization.
2025-01-30 19:58:15 +01:00
Max Kellermann
838398103c
Revert "event/Thread: start the thread in the constructor"
...
This reverts commit b49cfe96f4
. It was
a bad idea because it broke signal handlers. I need to find a better
way to fix io_uring intialization.
2025-01-30 19:58:15 +01:00
Max Kellermann
30bd70939a
lib/nfs/Connection: remove unnecessary include
2025-01-30 17:24:20 +01:00
Max Kellermann
275cd9d1d0
lib/nfs/Connection: give up connection after NFS4ERR_EXPIRED
...
Once a NFS request fails with NFS4ERR_EXPIRED, the whole connection is
broken and we need to open a new one. I wish libnfs would report this
to us as a connection-level error, but instead only the one request
fails; therefore this workaround is an ugly kludge.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/2175
2025-01-30 17:23:39 +01:00