[Gta04-owner] Sound devices in the GTA04
neilb at suse.de
Mon Dec 31 08:53:24 CET 2012
On Sun, 30 Dec 2012 12:35:44 +0000 Neil Jerram <neil at ossau.homelinux.net>
> Hi Neil and Nikolaus,
> I've been looking at / checking the ALSA states in QtMoko, after
> discovering that the PhoneHeadset state doesn't yet work. Although it's
> nearly a year old, I think your exchange beginning with the mail below
> is the best reference for understanding the ALSA controls, and I have a
> few questions about the details.
> I've also attached a spreadsheet that shows the current QtMoko A3 state
> settings, with markup about which states are or are not basically
> working, and whether controls are relevant to capture or playback, or
> irrelevant to the GTA04.
"Phone Headset" seems nearly identical to "PhoneEarpiece". The only
significant difference is that "Earpiece Playback Volume" is '1'
instead of '3'.
You probably want to turn on the headset, something like:
Headset Playback Volume - 3 3
Analog Left Headset Mic Capture Switch - true
HeadsetR Mixer AudioR2 - true
HeadsetL Mixer AudioL2 - true
And turn off the earpiece/main mike:
Earpiece Playback Volume 0
Earpiece Mixer AudioL2 - False
Analog Left Main Mic Capture Switch - False
> This might be useful to show the context for my questions - and of
> course I'd appreciate any comments you have on it.
> NeilBrown <neilb at suse.de> writes:
> > The best starting point is the diagram on page 692 of the doco for
> > TPS65950 aka TWL4030 referenced in table 5.1 of the GTA04 manual.
> > It is figure 14-6. It displays "Option 1". "Option 2" doesn't make sense for
> > the GTA04A3 due to the connections available.
> > There are 2 input channels, 'left' and 'right'.
> > 'left' can be connected to:
> > - on-board microphone "Analog Left Main Mic"
> > - headset microphone "Analog Left Headset Mic"
> > - AUX input line on alternate cable in headset jack "Analog Left AUXL"
> > 'right' can be connected to
> > - AUX input line on alternate cable in headset jack "Analog Right AUXR"
> I assume the controls for selecting these are:
> - 'Analog Right Sub Mic Capture Switch'
> - 'Analog Right AUXR Capture Switch'
> - 'Analog Left Main Mic Capture Switch'
> - 'Analog Left Headset Mic Capture Switch'
> - 'Analog Left AUXL Capture Switch'
> - 'Analog Left Carkit Mic Capture Switch'
> Does the "Sub Mic" have any meaning in the GTA04?
No. On sheet 7 of the schematic, you can see that MIC.SUB.P and
MIC.SUB.M are connected (throught a capacitor) to GND. So that input is unused.
I think the purpose of it is to have a secondary microphone which
picks up the same background noise as the main mic, but much less of
the spoken sound. But subtracting the 'sub' mic from the 'main' mic,
you avoid remove the background noise. But the GTA04 has nowhere to
put the extra mic.
> > Both channels have adjustable gain: "Analog"
> > (For these to be accessable "TX1" and "TX2" must be set to "Analog" - we
> > should try to impose that in the kernel and hide those settings).
> What are the 3.5 controls for the gain? The ones that look likely to me
> - 'TX1 Digital Capture Volume'
> - 'TX2 Digital Capture Volume'
> - 'Analog Capture Volume'
> - 'TX2 Capture Route'
> - 'TX1 Capture Route'
> But there's nothing in those names about left and right.
'Analog Capture Volume' (just 'Analog' in alsamixer) is a stereo volume control
name 'Analog Capture Volume'
access 'read write'
range '0 - 5'
Note there are 2 values (0 and 1). These are 'left' and 'right'.
> - Do the "1" and "2" in "TXn" correspond to left and right?
No. Look at Figure 14-7. The yellow box to the bottom left is
labelled 'TX path'. Note that there are 4 outputs that head to
the left and are labels "Mic channel 1" to "Mic channel 4".
So this comprise 2 stereo pairs.
TX1 refers to L1 and R1 which go to channel 1 and channel 3.
It can receive input from an analog or digital path.
TX2 refers to L2 and R2 which are channels 2 and 4. It can also get
analog or digital input.
There is just one ADC pair, so TX1 and TX2 get the same signal
if set to analog. There are possibly 2 digital mics (not installed
on GTA04), they get one each.
The net result for GTA04 is that TX2 is irrelevant and TX1
should be set to analog and will get one of:
- headset mic
- main mic
- aux input
> - Does 'Analog Capture Volume' apply to both left and right input
Yes, it is a stereo control, so volume can be set independantly for
> > The output side is a bit more complex. There are 4 digital channels allowing
> > quadraphonic sound! Left and Right, Front and Back. They can be mixed in
> > various ways with each other and with the amplified input streams and sent to
> > various output devices.
> I haven't gone deeply into the playback side yet, except that I've
> wondered a bit about sidetone. The Wikipedia entry indicates that
> sidetone is probably desirable, but I'm not completely clear about which
> ALSA controls to use to get it.
Right1 Analog Loopback
Left1 Analog Loopback
These need to be un-muted to get the side-tone.
You cannot directly control the volume of the side-tone.
Instead you control the volume of the sound being played using
"DAC1 Analog" or "DAC1 Digital", and adjust the post-mix amplifier
.... but I cannot find the control to adjust the post-mix amplifiers!
They are labeled
ARXR1 Analog PGA
ARXL1 Analog PGA
ARXR2 Analog PGA
ARXL2 Analog PGA
in Figure 14-7.
Maybe they are DAC1 Analog Playback Volume
and DAC2 Analog Playback Volume,
each stereo controls.
So to make the side-tone quieter, increase the DAC1 analog volume and
decreate the DAC1 Analog Playback Volume.
> > The 4 amplified analogue signals are optionally mixed with either the left or
> > right input channel (to provide a Voice Side-tone) in the main amplifier
> > stage. These are controlled by the switches
> > "Left1 Analog Loopback", "Right1 Analog Loopback"
> > "Left2 Analog Loopback", "Right2 Analog Loopback".
> > There is then a 5th analogue amplifier which just takes the Voice Loopback
> > (sidetone) signal and amplifies it separately to the digitally provided
> > signals.
> So is "Voice" just "Left input + Right input"? If it is, how do the
> "Voice" controls provide any further flexibility on top of the "Left"
> and "Right" loopback controls?
'Voice' applies to 'option 2' and refers to the path from the GSM module.
So it only applies to GTA04A4 and later.
So "DAC Voice" is the Digital-Analog-Converter that takes the digital signal
directly from the GSM module and converts to analog. It should then be routed
to the earpiece of headset.
> Finally, do you know if the "Downlink" controls have any relevance to
> sidetone? Or are they to do with something that isn't hooked up in the
It seems an odd name but I think it referes to the connection from the
GSM Modem to the speakers.
If the modem is connected to the clouds, and the speaker is in my ear,
then it is link from something up there to something down here, so
maybe it is a down-link ??
There are two paths - analog and digital.
For analog, the digital signal goes to a DAC (DAC Voice) and then the
analog signal can be mixed with others.
See the blue "Modulator 2nd" and "DAC Voice" in Figure 14-7.
For digital, the digital signal can be mixed with the digial ALSA
outputs and then converted to analog and amplified.
See "VDL Filter" and "VRX2ARX" and the "Voice D" path to
"Digital mixing", then white "Modulator 2nd" etc.
> > Oh, and "Happy new year" and all that.
> And to you too!
> Many thanks, Neil
Gee, was that a year ago ... it seems longer :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 828 bytes
Desc: not available
More information about the Gta04-owner