1
0
Fork
You've already forked dummystreamhack
0
you will use the service manager for this and you'll like it
  • C 77.3%
  • Meson 22.7%
Find a file
2026年05月26日 12:54:12 -03:00
dummystreamhack.c Initial commit 2026年05月26日 12:54:12 -03:00
dummystreamhack@.service.in Initial commit 2026年05月26日 12:54:12 -03:00
LICENSE Initial commit 2026年05月26日 12:54:12 -03:00
meson.build Initial commit 2026年05月26日 12:54:12 -03:00
README.md Initial commit 2026年05月26日 12:54:12 -03:00

dummystreamhack

dummystreamhack is a tiny service that opens a "dummy" ALSA PCM stream that connects voice call modem audio to audio outputs/inputs in a "Hostless FE" setup, such as with the WIP q6voice patches or downstream qcom kernels. It is fully controlled by the UCM profile and managed by the systemd user instance.

Very soon none of this will be necessary anymore on upstream Qualcomm devices.

Configuration

Use alsactl info to find out the device number of your VoiceMMode1 DAI (in this example it is 4). (You can also just count the DAIs defined in the DTS.)

Now edit the VoiceCall UCM profile to control instances of the dummystreamhack service.

Basically, the start goes at the end of the EnableSequence and the stop goes at the beginning of the DisableSequence. For the earpiece/speaker, the unit template name (i.e. the CLI argument to the binary) starts with the letter R and then contains the ALSA hw:<card>,<device> identifier for the VoiceMMode1 DAI; for the microphone it's the same but with the letter T. The card ID can be substituted using the UCM variable CardId, so it's only the "device" number (DAI index) that varies (in this example it's 4).

SectionDevice."Earpiece" {
 Comment "Earpiece"
 EnableSequence [
 # ....... more cset commands .......
 cset "name='Amplifier L Profile Set' Receiver"
 exec "systemctl --user start dummystreamhack@Rhw:${CardId},4"
 ]
 DisableSequence [
 exec "systemctl --user stop dummystreamhack@Rhw:${CardId},4"
 cset "name='Amplifier L Profile Set' Music"
 # ....... more cset commands .......
 ]
 Value {
 PlaybackChannels 1
 PlaybackPriority 200
 PlaybackPCM "hw:${CardId},0"
 }
}
SectionDevice."Mic3" {
 Comment "Bottom Microphone"
 EnableSequence [
 # ....... more cset commands .......
 cset "name='ADC2 Switch' 1"
 exec "systemctl --user start dummystreamhack@Thw:${CardId},4"
 ]
 DisableSequence [
 exec "systemctl --user stop dummystreamhack@Thw:${CardId},4"
 cset "name='ADC2 Switch' 0"
 # ....... more cset commands .......
 ]
 Value {
 CaptureChannels 1
 CapturePriority 200
 CapturePCM "hw:${CardId},2"
 }
}