QtMoko audio state work

Radek Polak psonek2 at seznam.cz
Thu Jan 17 14:43:19 CET 2013


On Thursday, January 17, 2013 01:52:57 AM Neil Jerram wrote:

> (As usual, for the sake of avoiding any possible negative marketing, I
> should point out that the main problems here are A3-specific.  I hope,
> and believe to be the case, that phone calls are already reliable on
> A4.)

Yes, A4 works 100% reliably for me now in last few months, but i have just a 
few calls...

> With Neil Brown's helpful input, I've reviewed and improved my
> understanding of all the ALSA state files and controls.  This was
> prompted specifically by the PhoneHeadset state not working (because it
> was completely wrong) but more generally it bothers me that we use such
> an over-general system as ALSA state files when there are really only a
> handful (in fact, 7 switches and 1 volume control) of independent things
> that we ever need to change when moving between audio states.  Also it
> has bothered me that we don't have a uniform and persistent way of
> changing overall volume.
> 
> I've now reimplemented the GTA04 neoaudioplugin.cpp code so that it
> moves between audio states by changing those 7 switches, instead of
> using ALSA state files, and that seems to work well (including for
> PhoneHeadset, subject to A3 software routing trouble).

Nice, imo that's the way how it should work. Alsa states were easiest solution 
- that's why i used it. Your code could work much better.

> One detail,
> which is nice but slightly worrying, is that I used to always to get a
> very audible click about 1s before, e.g., hearing the new message
> arrival sound; and with the reimplementation I no longer get that click.
> I _think_ the explanation for that was using pasuspender, and that I no
> longer get it because I no longer need to use pasuspender

pasuspender will still have to be used on A4 when switching to earpiece, 
because you cant switch if some other program has sound card open.

> - but it's
> slightly worrying in case that's wrong, and in particular in case it's
> because I'm leaving some circuit on more than before, and hence drawing
> more current.  (I haven't seen any evidence for drawing extra current.)

Maybe it can be measured during suspend.

> The simplicity of
> gta04-gsm-voice-routing is appealing, but I know from previous
> experience that it sometimes fails completely.

For me the problem was that some other program had soundcard open and gta04-
gsm-voice-routing couldnt open it. If all programs use pulseadio then it can 
be solved with pasuspender, but i wish that alsa had the same functionality. 
Then we could get rid of pulseaudio. Maybe something like this could be 
achieved using alsa plugins.

Regards

Radek




More information about the community mailing list