<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックiMX8MP HFP with Pulseaudio Routings</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-HFP-with-Pulseaudio-Routings/m-p/2034313#M233366</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are trying to utilze HFP on our custom board with i.MX8MP, TLV320AIC3100 audio codec and AW-CM358 wifi-bt module with NXP 88W8987.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can utilize A2DP when both our custom board as sink and source. We've tested our mic which is working we are able to record audio with it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can utilize calls via ofono, however we can't receive or transmit any sound for HFP. Here is our card info and loopback modules for pulseaudio:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Card #0
	Name: alsa_card.platform-sound-bt-sco
	Driver: module-alsa-card.c
	Owner Module: 6
	Properties:
		alsa.card = "1"
		alsa.card_name = "bt-sco-audio"
		alsa.long_card_name = "bt-sco-audio"
		device.bus_path = "platform-sound-bt-sco"
		sysfs.path = "/devices/platform/sound-bt-sco/sound/card1"
		device.form_factor = "internal"
		device.string = "1"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Profiles:
		input:mono-fallback: Mono Input (sinks: 0, sources: 1, priority: 1, available: yes)
		output:mono-fallback: Mono Output (sinks: 1, sources: 0, priority: 100, available: yes)
		output:mono-fallback+input:mono-fallback: Mono Output + Mono Input (sinks: 1, sources: 1, priority: 101, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: output:mono-fallback+input:mono-fallback
	Ports:
		analog-input: Analog Input (type: Analog, priority: 10000, latency offset: 0 usec, availability unknown)
			Part of profile(s): input:mono-fallback, output:mono-fallback+input:mono-fallback
		analog-output: Analog Output (type: Analog, priority: 9900, latency offset: 0 usec, availability unknown)
			Part of profile(s): output:mono-fallback, output:mono-fallback+input:mono-fallback

Card #1
	Name: alsa_card.platform-sound-tlv320aic31xx
	Driver: module-alsa-card.c
	Owner Module: 7
	Properties:
		alsa.card = "0"
		alsa.card_name = "tlv320aic31xx-Codec"
		alsa.long_card_name = "tlv320aic31xx-Codec"
		device.bus_path = "platform-sound-tlv320aic31xx"
		sysfs.path = "/devices/platform/sound-tlv320aic31xx/sound/card0"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Profiles:
		input:stereo-fallback: Stereo Input (sinks: 0, sources: 1, priority: 51, available: yes)
		output:stereo-fallback: Stereo Output (sinks: 1, sources: 0, priority: 5100, available: yes)
		output:stereo-fallback+input:stereo-fallback: Stereo Output + Stereo Input (sinks: 1, sources: 1, priority: 5151, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: output:stereo-fallback+input:stereo-fallback
	Ports:
		analog-input: Analog Input (type: Analog, priority: 10000, latency offset: 0 usec, availability unknown)
			Part of profile(s): input:stereo-fallback, output:stereo-fallback+input:stereo-fallback
		analog-output-speaker: Speakers (type: Speaker, priority: 10000, latency offset: 0 usec, availability unknown)
			Properties:
				device.icon_name = "audio-speakers"
			Part of profile(s): output:stereo-fallback, output:stereo-fallback+input:stereo-fallback

Card #3
	Name: bluez_card.DC_C4_9C_37_BB_0D
	Driver: module-bluez5-device.c
	Owner Module: 31
	Properties:
		device.description = "Gencay adlı kişiye ait S24"
		device.string = "DC:C4:9C:37:BB:0D"
		device.api = "bluez"
		device.class = "sound"
		device.bus = "bluetooth"
		device.form_factor = "phone"
		bluez.path = "/org/bluez/hci0/dev_DC_C4_9C_37_BB_0D"
		bluez.class = "0x5a020c"
		bluez.alias = "Gencay adlı kişiye ait S24"
		device.icon_name = "audio-card-bluetooth"
		bluetooth.codec = "mSBC"
	Profiles:
		a2dp_source: High Fidelity Capture (A2DP Source) (sinks: 0, sources: 1, priority: 20, available: yes)
		headset_audio_gateway: Headset Audio Gateway (HSP) (sinks: 1, sources: 1, priority: 10, available: no)
		handsfree_audio_gateway: Handsfree Audio Gateway (HFP) (sinks: 1, sources: 1, priority: 10, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: handsfree_audio_gateway
	Ports:
		phone-output: Phone (type: Phone, priority: 0, latency offset: 0 usec, availability unknown)
			Part of profile(s): headset_audio_gateway, handsfree_audio_gateway
		phone-input: Phone (type: Phone, priority: 0, latency offset: 0 usec, availability unknown)
			Part of profile(s): a2dp_source, headset_audio_gateway, handsfree_audio_gateway
root@imx8mp-lpddr4-evk:/# pactl list sinks short
0	alsa_output.platform-sound-bt-sco.mono-fallback	module-alsa-card.c	s16le 1ch 16000Hz	RUNNING
1	alsa_output.platform-sound-tlv320aic31xx.stereo-fallback	module-alsa-card.c	s16le 2ch 48000Hz	RUNNING
6	bluez_sink.DC_C4_9C_37_BB_0D.handsfree_audio_gateway	module-bluez5-device.c	s16le 1ch 16000Hz	SUSPENDED
root@imx8mp-lpddr4-evk:/# pactl list sources short
0	alsa_output.platform-sound-bt-sco.mono-fallback.monitor	module-alsa-card.c	s16le 1ch 16000Hz	IDLE
1	alsa_input.platform-sound-bt-sco.mono-fallback	module-alsa-card.c	s16le 1ch 16000Hz	RUNNING
2	alsa_output.platform-sound-tlv320aic31xx.stereo-fallback.monitor	module-alsa-card.c	s16le 2ch 48000Hz	IDLE
3	alsa_input.platform-sound-tlv320aic31xx.stereo-fallback	module-alsa-card.c	s16le 2ch 48000Hz	RUNNING
15	bluez_sink.DC_C4_9C_37_BB_0D.handsfree_audio_gateway.monitor	module-bluez5-device.c	s16le 1ch 16000Hz	IDLE
16	bluez_source.DC_C4_9C_37_BB_0D.handsfree_audio_gateway	module-bluez5-device.c	s16le 1ch 16000Hz	SUSPENDED
root@imx8mp-lpddr4-evk:/# pactl list modules short
0	module-device-restore		
1	module-stream-restore		
2	module-card-restore		
3	module-augment-properties		
4	module-switch-on-port-available		
5	module-udev-detect	tsched=0	
6	module-alsa-card	device_id="1" name="platform-sound-bt-sco" card_name="alsa_card.platform-sound-bt-sco" namereg_fail=false tsched=no fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"	
7	module-alsa-card	device_id="0" name="platform-sound-tlv320aic31xx" card_name="alsa_card.platform-sound-tlv320aic31xx" namereg_fail=false tsched=no fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"	
8	module-bluetooth-policy		
9	module-bluetooth-discover	headset=auto	
10	module-bluez5-discover	headset=auto	
11	module-native-protocol-unix		
12	module-default-device-restore		
14	module-always-sink		
15	module-intended-roles		
16	module-suspend-on-idle		
17	module-position-event-sounds		
18	module-role-cork		
19	module-filter-heuristics		
20	module-filter-apply		
31	module-bluez5-device	path=/org/bluez/hci0/dev_DC_C4_9C_37_BB_0D autodetect_mtu=0 output_rate_refresh_interval_ms=500 avrcp_absolute_volume=1	
35	module-loopback	source=alsa_input.platform-sound-tlv320aic31xx.stereo-fallback sink=alsa_output.platform-sound-bt-sco.mono-fallback latency_msec=20	
36	module-loopback	source=alsa_input.platform-sound-bt-sco.mono-fallback sink=alsa_output.platform-sound-tlv320aic31xx.stereo-fallback latency_msec=20	
42	module-loopback	sink="bluez_sink.DC_C4_9C_37_BB_0D.handsfree_audio_gateway" sink_dont_move="true" source_output_properties="media.role=phone"	
43	module-loopback	source="bluez_source.DC_C4_9C_37_BB_0D.handsfree_audio_gateway" source_dont_move="true" sink_input_properties="media.role=phone"&lt;/LI-CODE&gt;&lt;P&gt;We've adjusted hci command w.r.t UM11490 like below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# 1. Enable PCM Line Management by the Host
hcitool -i hci0 cmd 0x3F 0x0070 0x01

# 2. Set SCO Voice Data Path Through PCM Interface
hcitool -i hci0 cmd 0x3F 0x001D 0x01

# 3. Write PCM Settings (Enable PCM Clock Continuously)
hcitool -i hci0 cmd 0x3F 0x0007 0x10

# 4. Configure PCM Sync Settings
hcitool -i hci0 cmd 0x3F 0x0028 0x03 0x00 0x03

# 5. Configure PCM Link Settings
hcitool -i hci0 cmd 0x3F 0x0029 0x04 0x00

# 6. Write Voice Settings (Set CVSD Codec)
hcitool -i hci0 cmd 0x03 0x0026 0x60 0x00&lt;/LI-CODE&gt;&lt;P&gt;And below is our device tree for the pcm interface and codecs:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        sound-bt-sco {
                compatible = "simple-audio-card";
                simple-audio-card,name = "bt-sco-audio";
                simple-audio-card,format = "dsp_a";
                simple-audio-card,bitclock-inversion;
                simple-audio-card,frame-master = &amp;lt;&amp;amp;btcpu&amp;gt;;
                simple-audio-card,bitclock-master = &amp;lt;&amp;amp;btcpu&amp;gt;;

                btcpu: simple-audio-card,cpu {
                        sound-dai = &amp;lt;&amp;amp;sai2&amp;gt;;
                        dai-tdm-slot-num = &amp;lt;2&amp;gt;;
                        dai-tdm-slot-width = &amp;lt;16&amp;gt;;
                };

                simple-audio-card,codec {
                        sound-dai = &amp;lt;&amp;amp;bt_sco_codec 1&amp;gt;;
                };
        };
         sound-tlv320aic31xx {
                compatible = "simple-audio-card";
                simple-audio-card,name = "tlv320aic31xx-Codec";
                simple-audio-card,format = "i2s";
                simple-audio-card,frame-master = &amp;lt;&amp;amp;dailink_master&amp;gt;;//Which one is master
                simple-audio-card,bitclock-master = &amp;lt;&amp;amp;dailink_master&amp;gt;;//which one is master
                simple-audio-card,widgets =
                "Speaker", "External Speaker",
                "Headphone", "Headphone Jack",
                "Microphone", "Mic Jack";
                simple-audio-card,routing =
                "External Speaker", "SPK",
                "Headphone Jack", "HPL",
                "Headphone Jack", "HPR",
                "Mic Jack", "MIC1RP";
                dailink_master:simple-audio-card,cpu {
                        sound-dai = &amp;lt;&amp;amp;sai3&amp;gt;;
                };
                simple-audio-card,codec {
                        sound-dai = &amp;lt;&amp;amp;tlv320aic3100&amp;gt;;
                        system-clock-frequency = &amp;lt;12288000&amp;gt;;
                };
        };

&amp;amp;sai2 {
        #sound-dai-cells = &amp;lt;0&amp;gt;;
        pinctrl-names = "default";
        pinctrl-0 = &amp;lt;&amp;amp;pinctrl_sai2&amp;gt;;
        assigned-clocks = &amp;lt;&amp;amp;clk IMX8MP_CLK_SAI2&amp;gt;;
        assigned-clock-parents = &amp;lt;&amp;amp;clk IMX8MP_AUDIO_PLL1_OUT&amp;gt;;
        assigned-clock-rates = &amp;lt;12288000&amp;gt;;
        status = "okay";
};

&amp;amp;sai3 {
        #sound-dai-cells = &amp;lt;0&amp;gt;;
        pinctrl-names = "default";
        pinctrl-0 = &amp;lt;&amp;amp;pinctrl_sai3&amp;gt;;
        assigned-clocks = &amp;lt;&amp;amp;clk IMX8MP_CLK_SAI3&amp;gt;;
        assigned-clock-parents = &amp;lt;&amp;amp;clk IMX8MP_AUDIO_PLL1_OUT&amp;gt;;
        assigned-clock-rates = &amp;lt;12288000&amp;gt;;
        clocks = &amp;lt;&amp;amp;audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_IPG&amp;gt;, &amp;lt;&amp;amp;clk IMX8MP_CLK_DUMMY&amp;gt;,
                 &amp;lt;&amp;amp;audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_MCLK1&amp;gt;, &amp;lt;&amp;amp;clk IMX8MP_CLK_DUMMY&amp;gt;,
                 &amp;lt;&amp;amp;clk IMX8MP_CLK_DUMMY&amp;gt;;
        clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
        fsl,sai-mclk-direction-output;
        status = "okay";
};&lt;/LI-CODE&gt;&lt;P&gt;So we have few questions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Are our loopback routings for HFP are correct?&lt;/LI&gt;&lt;LI&gt;Do HFP uses pcm and A2DP use uart in terms of data transmission is this correct?&lt;/LI&gt;&lt;LI&gt;Are hci commands to prepare the module for PCM transmissions are correct?&lt;/LI&gt;&lt;LI&gt;What could be the issue for our case?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Best Regards,&lt;/P&gt;</description>
    <pubDate>Sun, 26 Jan 2025 14:36:22 GMT</pubDate>
    <dc:creator>Wobaffet</dc:creator>
    <dc:date>2025-01-26T14:36:22Z</dc:date>
    <item>
      <title>iMX8MP HFP with Pulseaudio Routings</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-HFP-with-Pulseaudio-Routings/m-p/2034313#M233366</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are trying to utilze HFP on our custom board with i.MX8MP, TLV320AIC3100 audio codec and AW-CM358 wifi-bt module with NXP 88W8987.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can utilize A2DP when both our custom board as sink and source. We've tested our mic which is working we are able to record audio with it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can utilize calls via ofono, however we can't receive or transmit any sound for HFP. Here is our card info and loopback modules for pulseaudio:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Card #0
	Name: alsa_card.platform-sound-bt-sco
	Driver: module-alsa-card.c
	Owner Module: 6
	Properties:
		alsa.card = "1"
		alsa.card_name = "bt-sco-audio"
		alsa.long_card_name = "bt-sco-audio"
		device.bus_path = "platform-sound-bt-sco"
		sysfs.path = "/devices/platform/sound-bt-sco/sound/card1"
		device.form_factor = "internal"
		device.string = "1"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Profiles:
		input:mono-fallback: Mono Input (sinks: 0, sources: 1, priority: 1, available: yes)
		output:mono-fallback: Mono Output (sinks: 1, sources: 0, priority: 100, available: yes)
		output:mono-fallback+input:mono-fallback: Mono Output + Mono Input (sinks: 1, sources: 1, priority: 101, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: output:mono-fallback+input:mono-fallback
	Ports:
		analog-input: Analog Input (type: Analog, priority: 10000, latency offset: 0 usec, availability unknown)
			Part of profile(s): input:mono-fallback, output:mono-fallback+input:mono-fallback
		analog-output: Analog Output (type: Analog, priority: 9900, latency offset: 0 usec, availability unknown)
			Part of profile(s): output:mono-fallback, output:mono-fallback+input:mono-fallback

Card #1
	Name: alsa_card.platform-sound-tlv320aic31xx
	Driver: module-alsa-card.c
	Owner Module: 7
	Properties:
		alsa.card = "0"
		alsa.card_name = "tlv320aic31xx-Codec"
		alsa.long_card_name = "tlv320aic31xx-Codec"
		device.bus_path = "platform-sound-tlv320aic31xx"
		sysfs.path = "/devices/platform/sound-tlv320aic31xx/sound/card0"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card"
	Profiles:
		input:stereo-fallback: Stereo Input (sinks: 0, sources: 1, priority: 51, available: yes)
		output:stereo-fallback: Stereo Output (sinks: 1, sources: 0, priority: 5100, available: yes)
		output:stereo-fallback+input:stereo-fallback: Stereo Output + Stereo Input (sinks: 1, sources: 1, priority: 5151, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: output:stereo-fallback+input:stereo-fallback
	Ports:
		analog-input: Analog Input (type: Analog, priority: 10000, latency offset: 0 usec, availability unknown)
			Part of profile(s): input:stereo-fallback, output:stereo-fallback+input:stereo-fallback
		analog-output-speaker: Speakers (type: Speaker, priority: 10000, latency offset: 0 usec, availability unknown)
			Properties:
				device.icon_name = "audio-speakers"
			Part of profile(s): output:stereo-fallback, output:stereo-fallback+input:stereo-fallback

Card #3
	Name: bluez_card.DC_C4_9C_37_BB_0D
	Driver: module-bluez5-device.c
	Owner Module: 31
	Properties:
		device.description = "Gencay adlı kişiye ait S24"
		device.string = "DC:C4:9C:37:BB:0D"
		device.api = "bluez"
		device.class = "sound"
		device.bus = "bluetooth"
		device.form_factor = "phone"
		bluez.path = "/org/bluez/hci0/dev_DC_C4_9C_37_BB_0D"
		bluez.class = "0x5a020c"
		bluez.alias = "Gencay adlı kişiye ait S24"
		device.icon_name = "audio-card-bluetooth"
		bluetooth.codec = "mSBC"
	Profiles:
		a2dp_source: High Fidelity Capture (A2DP Source) (sinks: 0, sources: 1, priority: 20, available: yes)
		headset_audio_gateway: Headset Audio Gateway (HSP) (sinks: 1, sources: 1, priority: 10, available: no)
		handsfree_audio_gateway: Handsfree Audio Gateway (HFP) (sinks: 1, sources: 1, priority: 10, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: handsfree_audio_gateway
	Ports:
		phone-output: Phone (type: Phone, priority: 0, latency offset: 0 usec, availability unknown)
			Part of profile(s): headset_audio_gateway, handsfree_audio_gateway
		phone-input: Phone (type: Phone, priority: 0, latency offset: 0 usec, availability unknown)
			Part of profile(s): a2dp_source, headset_audio_gateway, handsfree_audio_gateway
root@imx8mp-lpddr4-evk:/# pactl list sinks short
0	alsa_output.platform-sound-bt-sco.mono-fallback	module-alsa-card.c	s16le 1ch 16000Hz	RUNNING
1	alsa_output.platform-sound-tlv320aic31xx.stereo-fallback	module-alsa-card.c	s16le 2ch 48000Hz	RUNNING
6	bluez_sink.DC_C4_9C_37_BB_0D.handsfree_audio_gateway	module-bluez5-device.c	s16le 1ch 16000Hz	SUSPENDED
root@imx8mp-lpddr4-evk:/# pactl list sources short
0	alsa_output.platform-sound-bt-sco.mono-fallback.monitor	module-alsa-card.c	s16le 1ch 16000Hz	IDLE
1	alsa_input.platform-sound-bt-sco.mono-fallback	module-alsa-card.c	s16le 1ch 16000Hz	RUNNING
2	alsa_output.platform-sound-tlv320aic31xx.stereo-fallback.monitor	module-alsa-card.c	s16le 2ch 48000Hz	IDLE
3	alsa_input.platform-sound-tlv320aic31xx.stereo-fallback	module-alsa-card.c	s16le 2ch 48000Hz	RUNNING
15	bluez_sink.DC_C4_9C_37_BB_0D.handsfree_audio_gateway.monitor	module-bluez5-device.c	s16le 1ch 16000Hz	IDLE
16	bluez_source.DC_C4_9C_37_BB_0D.handsfree_audio_gateway	module-bluez5-device.c	s16le 1ch 16000Hz	SUSPENDED
root@imx8mp-lpddr4-evk:/# pactl list modules short
0	module-device-restore		
1	module-stream-restore		
2	module-card-restore		
3	module-augment-properties		
4	module-switch-on-port-available		
5	module-udev-detect	tsched=0	
6	module-alsa-card	device_id="1" name="platform-sound-bt-sco" card_name="alsa_card.platform-sound-bt-sco" namereg_fail=false tsched=no fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"	
7	module-alsa-card	device_id="0" name="platform-sound-tlv320aic31xx" card_name="alsa_card.platform-sound-tlv320aic31xx" namereg_fail=false tsched=no fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"	
8	module-bluetooth-policy		
9	module-bluetooth-discover	headset=auto	
10	module-bluez5-discover	headset=auto	
11	module-native-protocol-unix		
12	module-default-device-restore		
14	module-always-sink		
15	module-intended-roles		
16	module-suspend-on-idle		
17	module-position-event-sounds		
18	module-role-cork		
19	module-filter-heuristics		
20	module-filter-apply		
31	module-bluez5-device	path=/org/bluez/hci0/dev_DC_C4_9C_37_BB_0D autodetect_mtu=0 output_rate_refresh_interval_ms=500 avrcp_absolute_volume=1	
35	module-loopback	source=alsa_input.platform-sound-tlv320aic31xx.stereo-fallback sink=alsa_output.platform-sound-bt-sco.mono-fallback latency_msec=20	
36	module-loopback	source=alsa_input.platform-sound-bt-sco.mono-fallback sink=alsa_output.platform-sound-tlv320aic31xx.stereo-fallback latency_msec=20	
42	module-loopback	sink="bluez_sink.DC_C4_9C_37_BB_0D.handsfree_audio_gateway" sink_dont_move="true" source_output_properties="media.role=phone"	
43	module-loopback	source="bluez_source.DC_C4_9C_37_BB_0D.handsfree_audio_gateway" source_dont_move="true" sink_input_properties="media.role=phone"&lt;/LI-CODE&gt;&lt;P&gt;We've adjusted hci command w.r.t UM11490 like below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# 1. Enable PCM Line Management by the Host
hcitool -i hci0 cmd 0x3F 0x0070 0x01

# 2. Set SCO Voice Data Path Through PCM Interface
hcitool -i hci0 cmd 0x3F 0x001D 0x01

# 3. Write PCM Settings (Enable PCM Clock Continuously)
hcitool -i hci0 cmd 0x3F 0x0007 0x10

# 4. Configure PCM Sync Settings
hcitool -i hci0 cmd 0x3F 0x0028 0x03 0x00 0x03

# 5. Configure PCM Link Settings
hcitool -i hci0 cmd 0x3F 0x0029 0x04 0x00

# 6. Write Voice Settings (Set CVSD Codec)
hcitool -i hci0 cmd 0x03 0x0026 0x60 0x00&lt;/LI-CODE&gt;&lt;P&gt;And below is our device tree for the pcm interface and codecs:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        sound-bt-sco {
                compatible = "simple-audio-card";
                simple-audio-card,name = "bt-sco-audio";
                simple-audio-card,format = "dsp_a";
                simple-audio-card,bitclock-inversion;
                simple-audio-card,frame-master = &amp;lt;&amp;amp;btcpu&amp;gt;;
                simple-audio-card,bitclock-master = &amp;lt;&amp;amp;btcpu&amp;gt;;

                btcpu: simple-audio-card,cpu {
                        sound-dai = &amp;lt;&amp;amp;sai2&amp;gt;;
                        dai-tdm-slot-num = &amp;lt;2&amp;gt;;
                        dai-tdm-slot-width = &amp;lt;16&amp;gt;;
                };

                simple-audio-card,codec {
                        sound-dai = &amp;lt;&amp;amp;bt_sco_codec 1&amp;gt;;
                };
        };
         sound-tlv320aic31xx {
                compatible = "simple-audio-card";
                simple-audio-card,name = "tlv320aic31xx-Codec";
                simple-audio-card,format = "i2s";
                simple-audio-card,frame-master = &amp;lt;&amp;amp;dailink_master&amp;gt;;//Which one is master
                simple-audio-card,bitclock-master = &amp;lt;&amp;amp;dailink_master&amp;gt;;//which one is master
                simple-audio-card,widgets =
                "Speaker", "External Speaker",
                "Headphone", "Headphone Jack",
                "Microphone", "Mic Jack";
                simple-audio-card,routing =
                "External Speaker", "SPK",
                "Headphone Jack", "HPL",
                "Headphone Jack", "HPR",
                "Mic Jack", "MIC1RP";
                dailink_master:simple-audio-card,cpu {
                        sound-dai = &amp;lt;&amp;amp;sai3&amp;gt;;
                };
                simple-audio-card,codec {
                        sound-dai = &amp;lt;&amp;amp;tlv320aic3100&amp;gt;;
                        system-clock-frequency = &amp;lt;12288000&amp;gt;;
                };
        };

&amp;amp;sai2 {
        #sound-dai-cells = &amp;lt;0&amp;gt;;
        pinctrl-names = "default";
        pinctrl-0 = &amp;lt;&amp;amp;pinctrl_sai2&amp;gt;;
        assigned-clocks = &amp;lt;&amp;amp;clk IMX8MP_CLK_SAI2&amp;gt;;
        assigned-clock-parents = &amp;lt;&amp;amp;clk IMX8MP_AUDIO_PLL1_OUT&amp;gt;;
        assigned-clock-rates = &amp;lt;12288000&amp;gt;;
        status = "okay";
};

&amp;amp;sai3 {
        #sound-dai-cells = &amp;lt;0&amp;gt;;
        pinctrl-names = "default";
        pinctrl-0 = &amp;lt;&amp;amp;pinctrl_sai3&amp;gt;;
        assigned-clocks = &amp;lt;&amp;amp;clk IMX8MP_CLK_SAI3&amp;gt;;
        assigned-clock-parents = &amp;lt;&amp;amp;clk IMX8MP_AUDIO_PLL1_OUT&amp;gt;;
        assigned-clock-rates = &amp;lt;12288000&amp;gt;;
        clocks = &amp;lt;&amp;amp;audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_IPG&amp;gt;, &amp;lt;&amp;amp;clk IMX8MP_CLK_DUMMY&amp;gt;,
                 &amp;lt;&amp;amp;audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_MCLK1&amp;gt;, &amp;lt;&amp;amp;clk IMX8MP_CLK_DUMMY&amp;gt;,
                 &amp;lt;&amp;amp;clk IMX8MP_CLK_DUMMY&amp;gt;;
        clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
        fsl,sai-mclk-direction-output;
        status = "okay";
};&lt;/LI-CODE&gt;&lt;P&gt;So we have few questions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Are our loopback routings for HFP are correct?&lt;/LI&gt;&lt;LI&gt;Do HFP uses pcm and A2DP use uart in terms of data transmission is this correct?&lt;/LI&gt;&lt;LI&gt;Are hci commands to prepare the module for PCM transmissions are correct?&lt;/LI&gt;&lt;LI&gt;What could be the issue for our case?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Best Regards,&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jan 2025 14:36:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-HFP-with-Pulseaudio-Routings/m-p/2034313#M233366</guid>
      <dc:creator>Wobaffet</dc:creator>
      <dc:date>2025-01-26T14:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8MP HFP with Pulseaudio Routings</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-HFP-with-Pulseaudio-Routings/m-p/2036746#M233533</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Are our loopback routings for HFP are correct?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Yes, according to the documentation, those are the correct settings.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Do HFP uses pcm and A2DP use uart in terms of data transmission is this correct?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Yes, according to internal team A2DP protocol works on UART and HSP/HFP works on PCM interface.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Are hci commands to prepare the module for PCM transmissions are correct?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Yes, that is correct.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;What could be the issue for our case?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Some debugging options are:&lt;/P&gt;
&lt;P&gt;Verify that your Bluetooth headset is connected and using HFP&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;bluetoothctl info XX:XX:XX:XX:XX:XX&lt;/LI-CODE&gt;
&lt;P&gt;Your routing is correct but, please confirm the default Bluetooth sink:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;pactl list sinks short
pactl set-default-sink &amp;lt;sink-name&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2025 19:57:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8MP-HFP-with-Pulseaudio-Routings/m-p/2036746#M233533</guid>
      <dc:creator>JorgeCas</dc:creator>
      <dc:date>2025-01-31T19:57:00Z</dc:date>
    </item>
  </channel>
</rss>

