08-28-2023, 12:01 PM
(This post was last modified: 08-29-2023, 09:04 AM by Manieck71.)
Hi
System Mobian.
I run in terminal
ffmpeg -i file.wav -f alsa hw:0
but nothing is heard
How to configure?
How to switch between handset and loudspeaker?
Use -f pulse, not -f alsa. You want to output through PulseAudio/Pipewire, not directly through ALSA, because the raw ALSA device is normally already opened and reserved by PulseAudio or Pipewire. (Note that Pipewire supports the PulseAudio protocol, so -f pulse will work for both.)
The file is "xxx.way" or "xxx.wav"?
What do you mean by "built-in headphones"? The earpiece? Or the headphone port (but then the headphones are not "built-in", only the port is)?
The former can be selected with:
pactl set-sink-port 0 '[Out] Earpiece'
the latter with:
pactl set-sink-port 0 '[Out] Headphones'
and to switch back to the speaker, use:
pactl set-sink-port 0 '[Out] Speaker'
It works on Kali and Ubuntu but won't work on Mobian.
I have silence all the time
Well, open up a volume control GUI (on Plasma Mobile, it is in the settings under "Audio", I don't know where it is on Phosh) and check that the earpiece is not muted and that its volume is not zero. Normally, if you set a reasonable volume once, it should remember it next time you switch to the earpiece. Though I have seen various volume control bugs resetting some volumes to zero for whatever reason, so I cannot promise that it will not end up back at zero at some point in the future.