[fso based] Simplified mixer app

Al Johnson openmoko at mazikeen.demon.co.uk
Wed Oct 7 02:01:27 CEST 2009


On Wednesday 07 October 2009, Mikhail Umorin wrote:
> On Tuesday 06 October 2009 12:28:37 Al Johnson wrote:
> > On Tuesday 06 October 2009, Mikhail Umorin wrote:
> > > Thanks for the app, Al (see below)
> > >
> > > On Monday 05 October 2009 19:43:37 Al Johnson wrote:
> > > > On Friday 02 October 2009, Laszlo KREKACS wrote:
> > > > > On Fri, Oct 2, 2009 at 4:17 PM, Laszlo KREKACS
> > > > >
> > > > > <laszlo.krekacs.list at gmail.com> wrote:
> > > > > > But there is so many things what changed, that Im completely
> > > > > > lost.
> > > > >
> > > > > Just wanted to notice you, that restoring the original
> > > > > gsmhandset.state file (and rebooting)
> > > > > does solve my problem. Im able to take call, and hear the other
> > > > > party. (and he able to hear me).
> > > > >
> > > > > Although your program was nice. It changed the mic way better, what
> > > > > I had. Other party
> > > > > said, its much louder and clearer.
> > > > >
> > > > > Hope you can sort out, why the broken .state file is broken. And
> > > > > where the bugs comes from ...
> > > >
> > > > Updated version now available:
> > > > http://www.mazikeen.demon.co.uk/openmoko/fso-simplemixer.py
> > >
> > > In "simple" view if I slide volume all the way to the right, it goes to
> > > 101 (not 100) is that correct?
> >
> > That depends which slider it is ;-)
> >
> > It is correct. I map the alsa channels to a single slider giving equal
> > increments covering the full range possible from those channels. For the
> > outputs this is usually gives steps 0 to 101 while for the mic it is
> > usually 0 to 119. If you uncomment self.gta02mixer.PrintGains() and start
> > it from the cli it will show you the gain setting in dB for each step in
> > the debug output. Unfortunately pyalsaaudio only accepts integer
> > percentages when setting volume, so there are rounding errors when
> > actually setting the volumes.
> 
> I was talking about Stereo Out for Speaker (when not in call). Sorry to be
> unclear. So, how does the "simple" slider correspond to Bypass and
>  Headphone in the advanced view? Or are those things all different
>  controls? Moving the "simple" speaker slider seem to change Bypass and
>  Headphone, but at different rates for different ranges of the "simple"
>  slider.  When I max out the simple slider (to 101), bypass and headphone
>  are at 100, but at lower simple slider settings they change very
>  non-linear.

The 'simple' slider controls all the sliders in that group in the 'advanced' 
view to give smooth control of the overall volume. In this case that's Bypass 
and Headphone. The changes in individual controls may look nonlinear, but 
their combination produces even steps while avoiding combinations likely to 
cause distortion. That's the idea anyway. You can see the combinations in the 
lookup tables in the top 3/4 of the script if you're interested.

> This was probably discussed numerous times. But your visual  application
>  makes the channels easier to control and I finally feel that I have a
>  chance to get the volume I want during calls.

Great! That was the intention.

>  It's all so confusing....

So people tell me ;-) Compared to most instrumentation systems it's a breeze!

>  What's a good place to learn the relations between all the
>  channels/controls/bugs that make sound?

Start with the wiki. The Neo1973 page has an annotated block diagram that's 
actually for the Freerunner. Both pages give some info on which volume 
settings affect what in different alsa states. With the information there, and 
by looking at the alsa state files, you will be able to see how the switch 
settings route audio signals through the mixer chip. You can then refer to the 
Wolfson datasheet.

http://wiki.openmoko.org/wiki/Neo_1973_audio_subsystem
http://wiki.openmoko.org/wiki/Neo_Freerunner_audio_subsystem



More information about the community mailing list