I'm working with a picture-frame-like device manufactured by the late OpenPeak Inc. known as the OpenFrame (or O2 Joggler in the UK). It has an internal speaker and a 3.5mm line out socket; none of the other connections to its STAC9202 codec chip are exposed to the end user. I've been porting Ubuntu Bionic to the device and everything is done, except for the audio driver.

Back in kernel 3.18 it was possible to use the following kernel patch and userland ALSA patch to have these two outputs work correctly, with the insertion of a plug into the line out properly muting the internal speaker.



In kernel 4.14 the same trick no longer works, so I've rewritten the patch to more properly add support for this variant of STAC9202 to ALSA. It now looks like this:


This seems to line up the pin configurations appropriately, but when a plug is inserted to the line out, although the audio to the internal speaker is muted, the speaker emits a crackling sound whenever the device is processing. It seems that it is not being properly powered down and is amplifying general circuit noise. Disconnecting the plug returns sound to the internal speaker and the crackling ceases. This is reliable across multiple devices.

Here is the alsa-info output from both the crackling kernel 4.14 and the working-just-fine kernel 3.18.

alsa-info outputs for both 3.18 and 4.14

I don't have sufficient knowledge of ALSA drivers and patches and have been working purely from the configurations used by others over the years, so I would really appreciate somebody looking at the alsa-info output and the new patch to determine where I should go from here. I believe this is all to do with EAPD control, but what options I have for controlling that aren't known to me right now.

Ideally, I want to end up with the audio muting and switching correctly when the jack is inserted. A bonus would be to lose the unused (or at least inaccessible) audio input and output options in alsamixer and gain individual control of the internal speaker and line out levels (which appear to be paired together at the moment).

closed as too broad by Rui F Ribeiro, schily, DarkHeart, Kiwy, Archemar Sep 12 '18 at 8:14

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    There is an ALSA mailing list, where you'd probably have a higher chance of getting a reply to your technical question. – Tomáš Pospíšek Sep 9 '18 at 14:13
  • Thanks, I shall try to remember my mailing list etiquette and post there! – roobarb_ Sep 10 '18 at 9:42