Commit graph

1613 commits

Author SHA1 Message Date
Wim Taymans
ec77979890 alsa-pcm: default to max channels
When nothing else is specified, suggest the max number of channels
for a device.

See #467
2020-12-09 12:10:13 +01:00
Wim Taymans
d776a0917d alsa: refactor dll code 2020-12-09 12:09:40 +01:00
Wim Taymans
78e7a45e6e audioconvert: remap channels
We also need to remap channels for the splitter and merger.

Remember the port-config format and its channel layout. Internally,
we use a canonical channel layout which is simply all channels sorted
by id. Remap the channels accordingly.

Fixes #445
2020-12-07 14:21:21 +01:00
Wim Taymans
2d8a7809f1 audioconvert: set port-config flags 2020-12-07 14:20:56 +01:00
Wim Taymans
6566f52a7e a2dp-sink: don't accept more data when we need to flush
See #449
2020-12-06 15:56:04 +01:00
Wim Taymans
d2ff341263 a2dp: use right struct for ldac
Fixes #449
2020-12-06 13:03:05 +01:00
Wim Taymans
136fc028a5 prefer S24 over S16 formats
Prefer the higher quality over performance.

Fixes #457
2020-12-06 10:37:40 +01:00
Wim Taymans
316a96d501 improve debug 2020-12-06 09:32:12 +01:00
Wim Taymans
6d494c120f bluez5: improve debug 2020-12-05 20:56:56 +01:00
Wim Taymans
7996b44036 a2dp: fail if no ldac samplerate was found 2020-12-05 20:16:25 +01:00
Kamil Sołtysik
0a8a854721 Fix codec names in comments 2020-12-05 19:23:27 +01:00
Wim Taymans
c3c1a1184c a2dp: use unsigned for sizes 2020-12-05 08:30:14 +01:00
Wim Taymans
4797018e4f ldac: fix sample rates
Fix selection of sample rates.
Higer samplerates are not supported by the library so disable them.

See #449
2020-12-05 08:18:01 +01:00
Wim Taymans
635a378ca4 bluez5: don't error on 0 decode length
It can happen for the first frame when the codec is filling up.
2020-12-04 12:00:42 +01:00
Wim Taymans
a592eb60a8 bluez5: fix buffer filled check
Just check if the encode buffer is full. The max number of frames
has been obtained before.
2020-12-04 11:59:40 +01:00
Wim Taymans
106d597305 bluez5: add aptX and aptX HD codecs
They need the libopenaptx libraries from
https://github.com/pali/libopenaptx
2020-12-04 11:34:38 +01:00
Wim Taymans
af8bb55762 spa: fix test on 32 bit
Fixes #441
2020-12-04 09:36:05 +01:00
Wim Taymans
9818582abe a2dp: fix aac codec compilation 2020-12-03 19:03:38 +01:00
Wim Taymans
73b13e8ad5 a2dp: deinit codec_data in stop 2020-12-03 18:11:06 +01:00
Wim Taymans
8bf0b7b4db a2dp: delay codec init to after acquire
Some codecs need the MTU as a parameter so wait until we acquire
with creating the codec context.

Make some method to enumerate the parameters from the transport
config and use that for the EnumFormat param.
2020-12-03 18:05:57 +01:00
Wim Taymans
67694a1491 a2dp-ldac: free handle on error 2020-12-03 11:18:27 +01:00
Wim Taymans
908e3f3d1f bluez5: only register available A2DP encoder/decoder 2020-12-03 11:09:13 +01:00
Wim Taymans
dd8573a5c2 bluez5: add ldac codec 2020-12-03 10:16:14 +01:00
Wim Taymans
3363544d05 bluez5: use start_decode to skip the header 2020-12-02 17:01:22 +01:00
Wim Taymans
57886c1198 spa: add audio.position support in null sink 2020-12-02 12:59:50 +01:00
Wim Taymans
4c486c7ae3 spa: remove media.class from null-audio-sink
We can use it with othe media.class values as well
2020-12-02 11:47:08 +01:00
Wim Taymans
1e9b152bb5 spa: make an extra level for arrays
Make a level with type info for the array elements.
2020-12-01 13:30:14 +01:00
Wim Taymans
73e0bb255a props: add container property to PROP_INFO
So we can mark a property should be inside a container.
Use this info in pw_stream to construct properties.
2020-12-01 12:58:18 +01:00
Wim Taymans
d098c2ba86 acp: add option to disable hardware mixer
See #426
2020-12-01 10:43:39 +01:00
Wim Taymans
967a5e06b0 spa: fix type info
Link to objects in the parent field
Use the type, not the container for some properties. We need something
else to note the container type maybe
2020-11-30 13:30:19 +01:00
Wim Taymans
75a4cff450 improve debug 2020-11-29 16:38:36 +01:00
Wim Taymans
b8300c663b improve some errors
Silence some -ENOENT warnings, they can happen when the object we
are introspecting is destroyed
2020-11-29 16:22:50 +01:00
Haochen Tong
a1259a75be
spa: enable fallthrough attribute on recent clang 2020-11-29 02:32:12 +01:00
Wim Taymans
57a9e82f79 spa: 0 means there is nothing left from from spa_json_next() 2020-11-28 20:35:25 +01:00
Wim Taymans
6e4c138238 properties: support properties from json object sting
Make pw_properties_new_string() work with a json object string.
This makes it possible to specify property strings as more complex
objects and escape characters.
2020-11-28 20:25:39 +01:00
Wim Taymans
62cdec8448 spa: move json parser to utils
Add unit test
Add escape function
2020-11-28 15:34:01 +01:00
Wim Taymans
a417ffcd38 alsa: add timerfd based playback example 2020-11-27 10:30:54 +01:00
Wim Taymans
119678e8d1 Revert "alsa: sync to latest acp"
This reverts commit f611e34456.

There is something wrong with this
2020-11-26 12:40:44 +01:00
Wim Taymans
f611e34456 alsa: sync to latest acp 2020-11-26 11:16:31 +01:00
Wim Taymans
4d62899375 acp: sync versions 2020-11-26 10:42:26 +01:00
Wim Taymans
d77c563ae8 null-audio-sink: return fixed values for rate/channels when set 2020-11-26 10:21:36 +01:00
Wim Taymans
ddfb310087 alsa-pcm: improve recover from suspended state debug 2020-11-26 09:24:57 +01:00
Wim Taymans
c3138a9bac spa: make null-sink rate and channels configurable 2020-11-25 21:05:21 +01:00
Wim Taymans
b055b9de25 alsa: Make sure we handle errors in close
When a device is removed, close() will error. Warn about this but
continue closing our other things including marking the device
as closed so that we don't try to close it again later.

Fixes #413
2020-11-25 12:37:51 +01:00
Wim Taymans
a482e2e6e2 libcamera: delete the camera on error
Fixes #403
2020-11-24 09:25:07 +01:00
Wim Taymans
95e2ec9f72 channelmix: always copy the target channelmap 2020-11-23 20:17:38 +01:00
Elliott Sales de Andrade
6224068586 Fix some possible leaks. 2020-11-23 15:36:08 +00:00
Wim Taymans
231c3c8b8e channelmix: add channelmap in properties 2020-11-23 15:33:11 +01:00
Wim Taymans
abaf63dfe6 acp: put channelmap in properties 2020-11-23 15:31:51 +01:00
Wim Taymans
af3f18b489 acp: add channel layout and map channels 2020-11-23 15:31:10 +01:00