All of lore.kernel.org
 help / color / mirror / Atom feed
* Fixing EAPD for STAC9202 on an embedded platform.
@ 2018-09-10  9:51 Andy Davison
  2018-09-10 15:31 ` Takashi Iwai
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Davison @ 2018-09-10  9:51 UTC (permalink / raw)
  To: alsa-devel

Hi everyone,

I’m hoping that somebody here might be able to spot where I’m going wrong; 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.

https://github.com/andydvsn/OpenFrame-Kernel/blob/master/patches/03-stac9202-audio-pin-tweak.patch
https://github.com/andydvsn/OpenFrame-Ubuntu/blob/master/overlay-trusty/lib/firmware/of1-stac9202.patch

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:

https://gist.github.com/andydvsn/7bffa8de0ed691b14508485d75501ffc

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.

https://gist.github.com/andydvsn/ccf55e6f7961dd405fc39d41a6ce9ef6

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).

All the best,

    A.


-- 
Andrew Davison




_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-10-10 23:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-10  9:51 Fixing EAPD for STAC9202 on an embedded platform Andy Davison
2018-09-10 15:31 ` Takashi Iwai
2018-09-10 20:01   ` Andy Davison
2018-09-10 20:29     ` Takashi Iwai
2018-09-11  0:24       ` Andy Davison
2018-09-11  5:53         ` Takashi Iwai
2018-09-20  1:31           ` Andy Davison
2018-10-01  0:15             ` Andy Davison
2018-10-04 21:09               ` Takashi Iwai
2018-10-05 14:36                 ` Andy Davison
2018-10-10  9:29                   ` Andy Davison
2018-10-10 23:42                     ` Andy Davison

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.