Question: connecting both source and sink bluetooth devices
Hi,
This is a bluetooth question.
I have a nonstandard use case that the main device (that pipewire runs) connects to a bluetooth source device (HFP AG) and also connects to bluetooth sink device (HFP HF). Something similar to what's done in this, https://github.com/hakanjansson/hfp_sco_relay.
[HFP HF] <-> DUT (device under test) with PW <-> [HFP AG]
An application is to relaying the voice and add signal/notifications to the voice channel.
I also need to do the similar for A2DP source and sink.
Devices detection and link connection are fine (see the dot file for a2dp).
However, when audio is streamed out from the source, I see lots of over/under run (XRun), and this is from a2dp profile.
[D][000001381.390719][remote-node.c:1174 node_xrun()] node 0x55938dfda0: XRun! count:504 time:0 delay:0 max:0
[D][000001381.401384][remote-node.c:1174 node_xrun()] node 0x55938dfda0: XRun! count:505 time:0 delay:0 max:0
[D][000001381.412049][remote-node.c:1174 node_xrun()] node 0x55938dfda0: XRun! count:506 time:0 delay:0 max:0
[D][000001381.422718][remote-node.c:1174 node_xrun()] node 0x55938dfda0: XRun! count:507 time:0 delay:0 max:0
[D][000001381.433381][remote-node.c:1174 node_xrun()] node 0x55938dfda0: XRun! count:508 time:0 delay:0 max:0
[D][000001381.444047][remote-node.c:1174 node_xrun()] node 0x55938dfda0: XRun! count:509 time:0 delay:0 max:0
[D][000001381.454715][remote-node.c:1174 node_xrun()] node 0x55938dfda0: XRun! count:510 time:0 delay:0 max:0
[D][000001381.465364][remote-node.c:1174 node_xrun()] node 0x55938dfda0: XRun! count:511 time:0 delay:0 max:0
This test was done on the embedded devices (cortext A53, descent processor). I did the same on the ubuntu desktop, and I don't see the above issues.
I've been looking into the code; it seems to be pointing out the buffers, but not quite clear where to look, and any suggested direction would be appreciated.
Thank you very much,
digraph pipewire {
link_44 [shape=box style=filled fillcolor=lightblue];
link_44 [label="link_id: 44\loutput_node_id: 34\linput_node_id: 36\loutput_port_id: 37\linput_port_id: 41\lstate: active\l"];
port_37 -> link_44 -> port_41;
link_43 [shape=box style=filled fillcolor=lightblue];
link_43 [label="link_id: 43\loutput_node_id: 34\linput_node_id: 36\loutput_port_id: 38\linput_port_id: 39\lstate: active\l"];
port_38 -> link_43 -> port_39;
subgraph cluster_node_36 {
bgcolor=palegreen;
label="node_id: 36\lname: bluez_output.70_xx_xx_xx_xx_xx.a2dp-sink\lmedia_class: Audio/Sink\l"
port_42 [shape=box style=filled fillcolor=lightcoral];
port_42 [label="port_id: 42\lname: monitor_FR\ldirection: output\l"];
port_41 [shape=box style=filled fillcolor=lightslateblue];
port_41 [label="port_id: 41\lname: playback_FR\ldirection: input\l"];
port_40 [shape=box style=filled fillcolor=lightcoral];
port_40 [label="port_id: 40\lname: monitor_FL\ldirection: output\l"];
port_39 [shape=box style=filled fillcolor=lightslateblue];
port_39 [label="port_id: 39\lname: playback_FL\ldirection: input\l"];
}
subgraph cluster_node_34 {
bgcolor=palegreen;
label="node_id: 34\lname: bluez_input.40_xx_xx_xx_xx_xx.a2dp-source\lmedia_class: Stream/Output/Audio\l"
port_37 [shape=box style=filled fillcolor=lightcoral];
port_37 [label="port_id: 37\lname: output_FR\ldirection: output\l"];
port_38 [shape=box style=filled fillcolor=lightcoral];
port_38 [label="port_id: 38\lname: output_FL\ldirection: output\l"];
}
subgraph cluster_node_28 {
bgcolor=palegreen;
label="node_id: 28\lname: Dummy-Driver\lmedia_class: (null)\l"
}
}