Ups: Automatischen Microphone Gain aktiviert?

Erfüllt Euch euer spracherkennender Assistent nicht mehr jeden Wunsch? Melden die Kollegen im Videochat vielleicht, daß Ihr schon wieder mal so leise seid, dabei hattet Ihr das erst gestern richtig eingestellt? Glückwunsch, entweder Ihr seid Opfer von „wir wissen es besser“ Idioten geworden die AGC eingebaut haben oder Euch hat ein Pipewire-Glitch  erwischt.

Ups: Automatischen Microphone Gain aktiviert?

Alle paar Jahre muß man sich gegen einen dieser Trottel zur Wehr setzen, die es für eine total geniale Idee halten, daß andere Menschen zu blöd sind Ihre Mikrofoneinstellungen richtig zu machen und bauen dann AGC ein (Automatic Gain Control) . Das dachte ich natürlich zu erst auch und habe hier einen nicht ganz erst gemeinten Rant geschrieben, der sich gewaschen hatte 🙂 was wirklich schade ist, daß Ihr den jetzt leider verpasst, ehrlich 😉 Aber es war halt nur ein komischer Bug.

Was ist passiert?

Das Eingabegerät meiner Webcam, das hier das Mikro mimt, fing wilde an, die Pegel von selbst anzupassen, je nachdem wie man gesprochen hat. AMGC halt. Chromium machte das auch mal eine Weile, zum Glück nur für sich, war trotzdem in der Videokonferenz eine Vollkatastrophe, weil man es nicht abschalten konnte. Pipewire ist zum Glück nicht Chromium.

Den Glitch beheben geht so:

Macht mal den PulseAudio Lautstärkeregler auf -> Konfiguration

Das Konfigurationfesnter vom Pulseaudiolautstärkeregler. Wir sehen eine Auswahlbox für den normalen Treiber und den PRO AUDIO Treiber! PRO AUDIO ist ausgewählt als FixDann stellt Euren Treiber auf Pro Audio um und Fertig. AGC gibt es für PRO AUDIO Experten nicht 🙂 Die Aufnahmeeinstellungen für Carola und andere Apps reagieren teilweise ganz übel darauf, daß das Device neu initialisiert wird, deswegen kann es sein, daß Ihr die Anwendungen, die das Geräte währenddessen benutzen, neu starten müßt.

Wer es noch nicht gemerkt hat, das mit den Profis war natürlich nur ein Wortspiel 🙂 Mehr Infos zu PRO AUDIO gibt es hier.

Hat das auch Nachteile?

Ja, jetzt müssen alle Apps Ihren Pegel selbst regeln. Eure Carola lässt Euch da nicht im Stich, die Spracherkennung macht das schon. Andere Anwendungen wie Firefox könnten aber jetzt andere Pegel brauchen und müßten das selbst setzen. Das kann in die Hose gehen. Zum Glück musste es so nicht bleiben!

Aber, wie das Leben so spielt 😀

Am Ende half das:

  • Auf PRO AUDIO umstellen,
    Apps neustarten,
    auf „Analog Stereo-Eingabe“ umstellen,
    Apps nochmal starten.

AGC war deaktiviert. Es lohnt sich also den Ärger herunterzuschlucken, außer man hat ein Blog, und einfach mal zu schauen, ob es nicht doch einfach nur ein kleiner Initialisierungsbug war 😉 Natürlich wird jetzt wieder jemand fragen, wieso das Pipewires Schuld war, das offenbart der Fix, weil „PRO AUDIO“ und „Analog Stereo-Eingaben“ sogenannte Pipewireprofile sind, die das Gerät konfigurieren. Wenn man AGC mit einem Wechsel abschalten kann, war es wohl offensichtlich Pipewire selbst. Ich vermute ein skuriller Glitch beim Init des Gerätes. Mehr werden wir nie erfahren.

Pinephone: Fedora nicht updaten

Zur Zeit gibt es Probleme mit dem Sound, wenn jetzt aktualisieren würdet. Torbuntu schreibt dazu heute:

tor.sh
fedora-phone pipewire[891]: '_ucm0003.hw:PinePhone,0': capture open failed: No such device
  This is why the audio is borked now.
Offensichtlich gab es ein Alsa Update. Das hatten wir im Februara schonmal, da wußte niemand, wie seine Kombi an Pipewire und Alsa funktionierte, oder halt nicht.
Ich gebe dann grünes Licht, wenn Ihr wieder bedenkenlos updaten könnt.

Pinephone: Breakthrou on Fedora Pinephones

For all my normal readers, these are exceptional news, so we have to use english 😉

As you may know, Matrix is a chatprotocol which you can used with various clients, even as webapplications. As a webapplication you can make use of webfeatures like WEBRTC to open audio & video chats with End-2-EndCryption ( E2EC in matrix terms ).

On my tests to get a fully featured matrix client for the Pinephone, I had the idea to simply use firefox and chromium to access a self-hosted webinstance of the element-web client. It’s basically the same idea that Schildichat and others are using in form of an electron application, which you can install on your pc. Electron apps ship a special version of the Chromium browser with some html and javascript files as a package, i.e. inside a flatpak.

Pinephone: Breakthrou on Fedora Pinephones

As to the current date, no tested application on the normal Fedora aarch64 repo was capable of accessing the video cameras on the Pinephone, besides the specially crafted megapixels. Megapixels just takes pictures atm, so we had no working video solution.

Firefox makes a good matrix webclient ui and I knew from earlier tests, that in a WEBRTC session audio works good. Firefox can easily be made a clickable „Matrix“ icon the desktop by creating a matching desktopfile in :

    [Desktop Entry]
    Version=1.0
    Name=Matrix Web
    Comment=Directlink
    GenericName=Matrix Web
    Exec=env LIBVA_DRIVER_NAME=v4l2_request LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video0 LIBVA_V4L2_REQUEST_MEDIA_PATH=/dev/media0 MOZ_ENABLE_WAYLAND=1 firefox-wayland %U https://HOMESERVERNAME/web/
    Terminal=false
    X-MultipleArgs=false
    Type=Application
    Icon=/home/pine/images/matrix-logo.png
    Categories=Network;WebBrowser;
    MimeType=text/html;
    StartupWMClass=chromium-browser
    Keywords=web;browser;internet;
    X-Desktop-File-Install-Version=0.26

The URL needs to point to the web client and Javascript needs to be enabled. You may notice the V4L2 env vars, they are step one to enable gpu acceleration. If you run NoScript in your Firefox make the necessary adjustments and your on track. I tested audio calls and they worked as expected, so I thought to myself: „why not“ and hit the video call button.

It does not only sound like an accident, it was 🙂 To our all very great surprise the Pinephone cameras went on and presented a live YUYV image from the ov5640 camera chip. There is a theory how Firefox did it, but that needs further investigations 😉

You can mark the 4th of march, 2021 11:07 CET as the time and date, that first video call (we know of) was done \o/

The other side of such a call looked like this, and actually this also was a surprise, as we got full colors from the image:

The first reaction on the global Pinephone chat was amazing:

aluizioneto

Marius
Breaking News .. Video Chat via Matrix from Pinephone WORKING 😆
Very nice!!! That would solve everything for me. Where is my PP CE?? 😃

A great moment for Pinephone users 🙂

But, there is still much to be done here. Firefox on Pinephone does not have hw acceleration in use yet, so it took all 4 cpu cores on the phone to do that call and it was still not enough processing power, as the audio part was interrupted and lagging behind. Atm Mr. Stransky is helping out to fully enable the allwinner GPU for Firefox. You need to now, that we already have a working libva driver for the Allwinner soc, called libva-request.

MPV is already using this lib to decode FullHD MP4 movies on my Pinephone with next to 0 frame drops. The amount of power consumption has dropped significantly too, so it’s possible to watch a full length movie without running out of juice. The Pinephone is using 3.6 Watt if all cpu cores are running, which results in app. 2 hours until the battery is drained. With the help of the gpu this is no longer the case, as the power consumption got down to around 2 Watt, doubling the life time of a full battery charge.

When Firefox is using the gpu and we have a better performance, it will be possible to make a videocall and leave the house without a mobile powerbank 😉

We have to thank many contributors to made this happen, in special the Fedora SIG Mobility team members who are massively testing and updating packages for Pinephone and PineTab.

I hope, that we all can see us in a Pinephone driven smooth Videoconference soon 😉

if you wanne see a video taped in the pine, check this article on the bottom:

Pinephone: Willkommen bei Element