1 -- Bluez monitor config file --
5 bluez_monitor.properties = {
6 -- These features do not work on all headsets, so they are enabled
7 -- by default based on the hardware database. They can also be
8 -- forced on/off for all devices by the following options:
10 --["bluez5.enable-sbc-xq"] = true,
11 --["bluez5.enable-msbc"] = true,
12 --["bluez5.enable-hw-volume"] = true,
14 -- See bluez-hardware.conf for the hardware database.
16 -- Enabled headset roles (default: [ hsp_hs hfp_ag ]), this
17 -- property only applies to native backend. Currently some headsets
18 -- (Sony WH-1000XM3) are not working with both hsp_ag and hfp_ag
19 -- enabled, disable either hsp_ag or hfp_ag to work around it.
21 -- Supported headset roles: hsp_hs (HSP Headset),
22 -- hsp_ag (HSP Audio Gateway),
23 -- hfp_hf (HFP Hands-Free),
24 -- hfp_ag (HFP Audio Gateway)
25 ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]",
27 -- Enabled A2DP codecs (default: all).
28 --["bluez5.codecs"] = "[ sbc sbc_xq aac ldac aptx aptx_hd aptx_ll aptx_ll_duplex faststream faststream_duplex ]",
30 -- HFP/HSP backend (default: native).
31 -- Available values: any, none, hsphfpd, ofono, native
32 ["bluez5.hfphsp-backend"] = "ofono",
34 -- Properties for the A2DP codec configuration
35 --["bluez5.default.rate"] = 48000,
36 --["bluez5.default.channels"] = 2,
39 bluez_monitor.rules = {
40 -- An array of matches/actions to evaluate.
42 -- Rules for matching a device or node. It is an array of
43 -- properties that all need to match the regexp. If any of the
44 -- matches work, the actions are executed for the object.
47 -- This matches all cards.
48 { "device.name", "matches", "bluez_card.*" },
51 -- Apply properties on the matched object.
53 -- Auto-connect device profiles on start up or when only partial
54 -- profiles have connected. Disabled by default if the property
56 --["bluez5.auto-connect"] = "[ hfp_hf hsp_hs a2dp_sink hfp_ag hsp_ag a2dp_source ]",
57 ["bluez5.auto-connect"] = "[ hfp_hf hsp_hs a2dp_sink ]",
59 -- Hardware volume control (default: [ hfp_ag hsp_ag a2dp_source ])
60 --["bluez5.hw-volume"] = "[ hfp_hf hsp_hs a2dp_sink hfp_ag hsp_ag a2dp_source ]",
62 -- LDAC encoding quality
63 -- Available values: auto (Adaptive Bitrate, default)
64 -- hq (High Quality, 990/909kbps)
65 -- sq (Standard Quality, 660/606kbps)
66 -- mq (Mobile use Quality, 330/303kbps)
67 --["bluez5.a2dp.ldac.quality"] = "auto",
69 -- AAC variable bitrate mode
70 -- Available values: 0 (cbr, default), 1-5 (quality level)
71 --["bluez5.a2dp.aac.bitratemode"] = 0,
73 -- Profile connected first
74 -- Available values: a2dp-sink (default), headset-head-unit
75 --["device.profile"] = "a2dp-sink",
79 -- Make output hsp/hfp stream nodes go through the Communication endpoint
80 -- Unfortunately we cannot match on "media.class" because this property
81 -- is not known before the node is created
84 { "api.bluez5.profile", "equals", "headset-audio-gateway" },
85 { "factory.name", "matches", "*source*" },
89 ["media.role"] = "Communication",
93 -- Make output a2dp stream nodes go through the Multimedia endpoint
94 -- Unfortunately we cannot match on "media.class" because this property
95 -- is not known before the node is created
98 { "api.bluez5.profile", "equals", "a2dp-source" },
102 ["media.role"] = "Multimedia",
107 load_monitor("bluez", {
108 properties = bluez_monitor.properties,
109 rules = bluez_monitor.rules,