Anyone have bluetooth headset working (for phone)?
#9
(06-03-2021, 07:02 PM)TRS-80 Wrote: 1. A2DP profile (regular audio) works, but HSP (headset profile) results only in buzzing sound from earpiece.  It seems the latter has not been implemented yet?

This is probably 8723cs driver issue. Buzzing noise does not happen when I use USB Bluetooth adapter on PinePhone.


Even if HSP does work, we need to solve another problem (at least on PinePhone).

Currenly audio is handled by audio codec in A64 SoC while voice calling, so that
it does not require main CPU to process audio.
Because of that, any audio source/sink connected outside of audio codec cannot be directly used for calling. (e.g. USB Headset)

We probably have to:

1. create a profile for routing modem audio to main CPU (alsa or pulseaudio?)
2. craete a way to loopback audio source/sink into modem.

I have experimented my idea with USB headset.
With some manual adjustment with pavucontrol, voice calling over USB headset seemed to be working.
Here is my script I hacked together:

Code:
#!/bin/sh
source_pine=alsa_input.platform-sound.Voice_Call__hw_PinePhone_0__source
source_usb=alsa_input.usb-Creative_Technology_Ltd_Sound_Blaster_JAM_V2_XXXXXXXXXXXXXXXXXX-00.mono-fallback
sink_pine=alsa_output.platform-sound.Voice_Call__hw_PinePhone_0__sink
sink_usb=alsa_output.usb-Creative_Technology_Ltd_Sound_Blaster_JAM_V2_XXXXXXXXXXXXXXXXXX-00.mono-fallback

# mix modem audio
amixer -c 0 cset "name=AIF2 Digital ADC Capture Switch" on
amixer -c 0 cset "name=AIF2 ADC Mixer AIF1 DA0 Capture Switch" on
# mute internal mic and speaker
amixer -c 0 cset "name=Mic1 Capture Switch" off
amixer -c 0 cset "name=Line Out Playback Switch" off

ffmpeg -f pulse -i "$source_pine" -f pulse -device "$sink_usba" 1 &
job1=$!
ffmpeg -f pulse -i "$source_usb" -f pulse -device "$sink_pine" 2 &
job2=$!

echo Press enter to stop
read l
kill $job1 $job2

amixer -c 0 cset "name=AIF2 Digital ADC Capture Switch" off
amixer -c 0 cset "name=AIF2 ADC Mixer AIF1 DA0 Capture Switch" off
Note: This is not a reliable method and induce about 2s of lag.
  Reply


Messages In This Thread
RE: Anyone have bluetooth headset working (for phone)? - by awaittrot - 06-20-2021, 10:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Rii mini 4 keyboard and touchpad work over Bluetooth Peter Gamma 0 390 07-19-2024, 08:02 AM
Last Post: Peter Gamma
  Bluetooth keyboard with trackpad Zebulon Walton 11 11,202 06-29-2024, 04:09 AM
Last Post: Peter Gamma
Exclamation USB mouse isn't working when a PP keyboard is attached? mikeb 6 2,476 06-25-2024, 12:10 AM
Last Post: Peter Gamma
  Keyboard doesn't charge my phone no matter what, so can I charge my phone directly ragreenburg 3 17,794 01-14-2024, 03:34 PM
Last Post: acid andy
  Getting all keys working on pine phone keyboard-case undata 5 3,464 10-08-2023, 12:19 PM
Last Post: mburns
  Keyboard : replaced the logic board charging now working again grump_fiddle_reinstall 1 1,213 07-01-2023, 07:57 AM
Last Post: grump_fiddle_reinstall
  Pine phone keyboard ? bcnaz 66 54,880 12-27-2022, 05:13 AM
Last Post: hlaube
  PinePhone Keyboard on other phone/over USB Dakkaron 1 2,343 10-20-2022, 03:47 AM
Last Post: svenh
  Pine Phone cases and accessories bcnaz 22 33,760 08-14-2022, 08:39 AM
Last Post: cool
  Wired headset mic stopped working Zebulon Walton 4 4,943 06-07-2022, 10:39 PM
Last Post: photon

Forum Jump:


Users browsing this thread: 10 Guest(s)