Ataberk Özen
701b5e6cef
alsa-mixer: Asus Xonar SE supports digital 5.1
2022-11-17 15:41:29 +03:00
Wim Taymans
b46d8a8c92
alsa: force playback start when buffer is full
...
When we try to play data but the ringbuffer is full, we need to start
the device or else we will stay in this situation forever and stay
silent.
Fixes #2830
2022-11-16 20:45:38 +01:00
Wim Taymans
50a24ac69e
acp: do probing in 44100 Hz again
...
Some devices don't seem to work when probed in 48000 so bring it back
to 44100 until we figure out what is going on.
Fixes #2718
2022-11-15 16:30:26 +01:00
Pauli Virtanen
e96b0ed4a8
alsa: minor fixes in seq code
...
port_enum_params should use right param id for SPA_PARAM_Format.
Fix typoed , instead of ; at end of line. Pop frame before putting
state.offset, in case there would be padding added (apparently usually
no).
2022-11-08 09:33:56 +00:00
Jaroslav Kysela
a2278a5f70
spa: support the speakers (output) only case in report_jack_state()
...
The Realtek ALC4080 USB audio device (integrated in the
motherboards) can detect the presence on all I/O jacks.
If user connects only speakers, it's a valid case.
BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/2744
2022-10-29 20:22:06 +02:00
Wim Taymans
71879961db
alsa-seq: avoid division by 0
...
Make sure the rate in the state is updated in all cases and make sure
that it never has anything with a 0 in it to avoid division by zero.
2022-10-21 13:15:36 +02:00
Wim Taymans
4c1115cf1d
alsa-seq: attempt to get more data in timeout
...
Also emit the NEED_DATA status so that the graph will pull in new
midi data even when we don't output anything.
Fixes #2775
2022-10-20 17:44:42 +02:00
Wim Taymans
f7c4909243
udev: use devpath for the sysfs.path property
...
So that it matches what pulseaudio does.
Fixes #2779
2022-10-20 16:44:37 +02:00
Jonas Holmberg
22a1e5b848
alsa-pcm: Start playback when there is data
...
Do not start the playback device until there is data to play. Otherwise
time consuming configuration of other nodes (such as setting hw params
of a capture device) may be done after playback has been started, which
may cause xrun.
2022-10-17 15:21:49 +02:00
Wim Taymans
0397d7b2be
alsa-udev: avoid meth with void pointers
2022-10-06 19:34:09 +02:00
Demi Marie Obenour
e8f3450a58
Fix various compiler warnings
...
These caused build failures with -Werror.
2022-10-06 12:12:35 -04:00
Wim Taymans
d22feab92a
spa: add macro to simplify array iterations some more
...
uint32_t i;
for (i = 0; i < SPA_N_ELEMENTS(some_array); i++)
.. stuff with some_array[i].foo ...
becomes:
SPA_FOR_EACH_ELEMENT_VAR(some_array, p)
.. stuff with p->foo ..
2022-09-30 16:24:26 +02:00
Ataberk Özen
10ac448b59
alsa-mixer: add support for Asus Xonar SE
2022-09-25 12:52:14 +03:00
Demi Marie Obenour
671a7102ff
Fix some badly-behaved macros
...
Some macros evaluated their arguments more than once when it was not
needed, or were missing parentheses.
2022-09-23 11:39:33 -04:00
Demi Marie Obenour
bb4f274ae0
Make all fopen() calls use O_CLOEXEC
...
by adding "e" to the mode strings.
2022-09-23 15:19:01 +00:00
Wim Taymans
71a918fae1
acp-tool: handle ctrl-D to exit
...
Fixes #2700
2022-09-21 17:32:13 +02:00
Jonas Holmberg
dacbeca77e
alsa-pcm: Change resync warning logic
...
Log follower resync messages with info level until there has been a
successful read or write to get rid of the initial warning when starting
a stream.
2022-09-21 16:42:37 +02:00
Wim Taymans
ef39576150
alsa: rate limit some warnings
2022-09-21 15:52:24 +02:00
Dmitry Sharshakov
3b89e6f369
alsa-seq: add an option to disable longname in MIDI ports
...
Untested yet
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
2022-09-13 07:46:40 +00:00
Dmitry Sharshakov
ea646c2d98
alsa-seq: set card long name or number in port names
...
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
2022-09-13 07:46:40 +00:00
Wim Taymans
903f831b2d
alsa: scale min value back to nominal rate
2022-09-07 23:39:51 +02:00
Wim Taymans
7057cca05e
alsa: adjust min and max rates
...
Use the DSD scaler and interleave factors to calculate the min and
max rates.
2022-09-07 21:58:32 +02:00
Wim Taymans
955815b468
alsa: only scale DSD samplerates
2022-09-07 21:42:45 +02:00
Wim Taymans
68581235ae
alsa: fix min dsd rate
...
We just need to allow from DSD64 onwards. Remove some unused fields.
2022-09-07 20:23:53 +02:00
Wim Taymans
72b6788c68
alsa: don't set impossible rates
...
When the max rate is smaller than the min rate, don't add the DSD
format at all because it is not possible to play it.
See #93
2022-09-07 19:58:30 +02:00
Wim Taymans
23522651f9
alsa: dsd rates are expressed in byte rate
...
DSD64 would be a rate of 44100 * 64 / 8. When packed in U32_BE, we would
negotiate 44100 * 8 / 4 (88200) with the device, this means all rates
from 88200 and up are allowed for DSD64 in U32_BE.
2022-09-07 19:54:09 +02:00
Wim Taymans
5b2b93f915
alsa: add period-size, period-num and headroom in props
...
Add the currently configured alsa hw_params in the properties for
easier access.
2022-09-06 20:16:29 +02:00
Wim Taymans
7b432aec88
spa: make default samplerate 48000
...
Remove some 44100 default rates and use 48000 instead.
2022-09-05 12:21:20 +02:00
Wim Taymans
9123710971
spa: clean up some port io checks
...
We should not generate a warning.
2022-09-01 15:39:34 +02:00
Wim Taymans
2fa1b4384b
spa: don't warn for NULL io
...
The io is set to NULL when the port becomes unnegotiated.
2022-09-01 15:31:14 +02:00
Wim Taymans
2054dcf36f
alsa: Improve format negotiation
...
When the device is not running but has a format, close/open the
device to get all the available formats again. Do the same when
setting a format.
Otherwise, the configuration space of the device is restricted to the
current negotiated format and we can't query the other possibilities
or change it.
Fixes #2625
2022-08-31 10:03:39 +02:00
Wim Taymans
b33ffcf683
test: print channel map as reported by alsa as well
...
See #1707
2022-08-30 16:45:35 +02:00
Wim Taymans
f971362f76
alsa: improve test
...
Add capture mode, add more info for class
2022-08-09 12:16:37 +02:00
Wim Taymans
80b59a4971
alsa: add test for dumping hw_params
...
See #2620
2022-08-09 11:51:20 +02:00
Wim Taymans
54b499b1cf
alsa: do the right log level checks
...
spa_log_level_enabled does not work when a custom log level has
been set. Use spa_log_level_topic_enabled instead.
2022-08-05 15:03:22 +02:00
Wim Taymans
73073eb33f
alsa: redirect alsa output to log file
...
Make a custom snd_output object that redirects output to the log
file.
2022-08-05 14:01:37 +02:00
Wim Taymans
0dc5a08bfd
alsa: debug hw_params
2022-08-05 13:00:44 +02:00
Wim Taymans
a9ced45d4b
acp: add debug for open and close
...
Debug open and close calls.
Make pa_alsa_close to close the device.
2022-08-05 12:31:28 +02:00
Wim Taymans
34c1c1614e
alsa: add some more debug
...
See #2614
2022-08-04 14:25:24 +02:00
Wim Taymans
1118c35956
acp: handle some more mixer NULL cases
...
These are in pulseaudio handled with asserts.
Fixes #2612
2022-08-04 09:06:28 +02:00
Wim Taymans
6144d037ce
acp: handle NULL mixer_handle
...
It can be NULL for some UCM configs.
Fixes #2612
2022-08-03 12:34:13 +02:00
Wim Taymans
e22e522ab8
alsa-pcm: limit the target to the buffer size
...
Don't try to wait for more samples than can fit in the ringbuffer.
See #2603
2022-08-03 12:22:38 +02:00
Fabian Vogt
ed88cad583
spa/alsa-udev: Check accessibility of pcm devices as well
...
The order of attribute changes is random, so it's possible that controlCX is
accessible before the other devices, which marks the device as available but it
actually fails to open. Only consider the device accessible if both control and
PCM devices can be accessed.
This requires reacting to ATTRIB changes of pcm devices as well now.
Fixes #2534
2022-07-13 09:17:08 +00:00
Wim Taymans
52281b9a7e
alsa: check the offset against the size of the buffer
...
We need to check the last offset against the size of the buffer, not the
remaining size in the buffer.
When the writing is split, this could cause the buffer to be reused
wrongly.
See #2536
2022-07-13 09:37:01 +02:00
Wim Taymans
03f918bf15
udev: prefix vendor.id and product.id with 0x
...
They are hex strings so prefix them with 0x to make sure they get
handled like that in properties.
Fixes #2527
2022-07-11 11:55:42 +02:00
Wim Taymans
bdfde2fdf0
Revert "spa: leave vendor.id and product.id in hex"
...
This reverts commit 0d33760b71 .
2022-07-11 11:23:08 +02:00
Wim Taymans
bc1789c3ea
Revert "acp: sync with pulseaudio"
...
This reverts commit 57f0fdf746 .
This seems to cause problems and needs to mature a bit more in
pulseaudio it seems.
2022-07-11 10:03:01 +02:00
Wim Taymans
57f0fdf746
acp: sync with pulseaudio
2022-07-07 12:23:28 +02:00
Pauli Virtanen
df2c5d6a14
alsa: fix uninitialized variable
2022-07-06 14:36:22 +00:00
Carlos Rafael Giani
7e44909741
alsa: add lower rate bound for DSD playback
...
This prevents errors when trying to play at a rate
that's lower than DSD64 (the lowest rate available).
2022-07-05 16:56:50 +00:00