1 -- Bluez monitor config file --
5 bluez_monitor.properties = {
6 -- Enable mSBC support, disabled by default. Be aware that
7 -- mSBC is not expected to work on all headset + adapter combinations.
8 -- This can be overloaded for a specific device and native backend
10 --["bluez5.msbc-support"] = false,
12 --["bluez5.sbc-xq-support"] = true,
14 -- Enabled headset roles (default: [ hsp_hs hfp_ag ]), this
15 -- property only applies to native backend. Currently some headsets
16 -- (Sony WH-1000XM3) are not working with both hsp_ag and hfp_ag
17 -- enabled, disable either hsp_ag or hfp_ag to work around it.
19 -- Supported headset roles: hsp_hs (HSP Headset),
20 -- hsp_ag (HSP Audio Gateway),
21 -- hfp_hf (HFP Hands-Free),
22 -- hfp_ag (HFP Audio Gateway)
23 ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]",
25 -- Enabled A2DP codecs (default: all).
26 --["bluez5.codecs"] = "[ sbc aac ldac aptx aptx_hd ]",
28 -- Properties for the A2DP codec configuration
29 --["bluez5.default.rate"] = 48000,
30 --["bluez5.default.channels"] = 2,
33 bluez_monitor.rules = {
34 -- An array of matches/actions to evaluate.
36 -- Rules for matching a device or node. It is an array of
37 -- properties that all need to match the regexp. If any of the
38 -- matches work, the actions are executed for the object.
41 -- This matches all cards.
42 { "device.name", "matches", "bluez_card.*" },
45 -- Apply properties on the matched object.
47 -- Auto-connect device profiles on start up or when only partial
48 -- profiles have connected. Disabled by default if the property
50 --["bluez5.auto-connect"] = "[ hfp_hf hsp_hs a2dp_sink hfp_ag hsp_ag a2dp_source ]",
51 ["bluez5.auto-connect"] = "[ hfp_hf hsp_hs a2dp_sink ]",
53 -- Overload mSBC support for native backend and a specific device.
54 --["bluez5.msbc-support"] = false,
56 -- Hardware volume control (default: [ hfp_ag hsp_ag a2dp_source ])
57 --["bluez5.hw-volume"] = "[ hfp_hf hsp_hs a2dp_sink hfp_ag hsp_ag a2dp_source ]",
59 -- LDAC encoding quality
60 -- Available values: auto (Adaptive Bitrate, default)
61 -- hq (High Quality, 990/909kbps)
62 -- sq (Standard Quality, 660/606kbps)
63 -- mq (Mobile use Quality, 330/303kbps)
64 --["bluez5.a2dp.ldac.quality"] = "auto",
66 -- AAC variable bitrate mode
67 -- Available values: 0 (cbr, default), 1-5 (quality level)
68 --["bluez5.a2dp.aac.bitratemode"] = 0,
70 -- Profile connected first
71 -- Available values: a2dp-sink (default), headset-head-unit
72 --["device.profile"] = "a2dp-sink",
76 -- Make output hsp/hfp stream nodes go through the Communication endpoint
77 -- Unfortunately we cannot match on "media.class" because this property
78 -- is not known before the node is created
81 { "api.bluez5.profile", "equals", "headset-audio-gateway" },
82 { "factory.name", "matches", "*source*" },
86 ["media.role"] = "Communication",
90 -- Make output a2dp stream nodes go through the Multimedia endpoint
91 -- Unfortunately we cannot match on "media.class" because this property
92 -- is not known before the node is created
95 { "api.bluez5.profile", "equals", "a2dp-source" },
99 ["media.role"] = "Multimedia",
104 function bluez_monitor.enable()
105 load_monitor("bluez", {
106 properties = bluez_monitor.properties,
107 rules = bluez_monitor.rules,