Problems with ASoC and Bluetooth routing

Jan Lübbe jluebbe at openmoko.org
Thu Feb 26 16:28:07 CET 2009


On Thu, 2009-02-26 at 14:10 +-0000, Mark Brown wrote:
+AD4 On Thu, Feb 26, 2009 at 11:59:01AM +-0100, Jan L+APw-bbe wrote:
+AD4 
+AD4 +AD4 The problem here seems to he the +ACI-Capture Left Mixer+ACI control is set to
+AD4 +AD4 +ACI-Analogue Mix Left+ACI. When i now switch this to something different
+AD4 +AD4 (+ACI-Analogue Mix Right+ACI) and back, the receive path starts working. Paul
+AD4 +AD4 and J+APY-rg suggested it might have something to do with DAPM. Also i
+AD4 
+AD4 Please supply the ALSA state files for each stage of the process (the
+AD4 initial state then the state after each operation).  That should let me
+AD4 reproduce exactly what you're doing.

I've reproduced it directly after booting and have dumped the the alsa
state and dapm+AF8-widget at each stage.

+AD4 You can check the power state of all the driver components by looking in
+AD4 /sys/bus/platform/devices/soc-audio/dapm+AF8-widgets and building soc-dapm.c
+AD4 with +ACM-define DEBUG at the top will make it very much more verbose about
+AD4 the power decisions it's making.

Ok, here's what it did:
- Start a call (this will load gsmhandset)
root+AEA-om-gta02:+AH4AIw cat /sys/bus/platform/devices/soc-audio/dapm+AF8-widget +AD4 dapm+AF8-call+AF8-started
root+AEA-om-gta02:+AH4AIw alsactl -f alsa+AF8-call+AF8-started store  
- Use Blues to start a SOC connection to the headset (now noise is audible in the headset)
- Load the GSMBLUETOOTH state
root+AEA-om-gta02:+AH4AIw alsactl -f GSMBLUETOOTH.txt restore
root+AEA-om-gta02:+AH4AIw cat /sys/bus/platform/devices/soc-audio/dapm+AF8-widget +AD4 dapm+AF8-headset+AF8-restored
root+AEA-om-gta02:+AH4AIw alsactl -f alsa+AF8-headset+AF8-restored store  
- Set the DAC/ADC rates via pyalsa (see http://www.robsims.com/FR-BTAudio) now sound is
  transmitted from BT to the remote party.
root+AEA-om-gta02:+AH4AIw cat /sys/bus/platform/devices/soc-audio/dapm+AF8-widget +AD4 dapm+AF8-rate+AF8-set        
root+AEA-om-gta02:+AH4AIw alsactl -f alsa+AF8-rate+AF8-set store
- Now i use alsamixer to set 'Capture Right Mixer' to 'Analogue Mix Right' (no audible change)
root+AEA-om-gta02:+AH4AIw alsamixer 
root+AEA-om-gta02:+AH4AIw cat /sys/bus/platform/devices/soc-audio/dapm+AF8-widget +AD4 dapm+AF8-fix+AF8-step1
root+AEA-om-gta02:+AH4AIw alsactl -f alsa+AF8-fix+AF8-step1 store  
- Now i set 'Capture Right Mixer' back to 'Analogue Mix Left' and have working sound in both directions
root+AEA-om-gta02:+AH4AIw alsamixer
root+AEA-om-gta02:+AH4AIw cat /sys/bus/platform/devices/soc-audio/dapm+AF8-widget +AD4 dapm+AF8-fix+AF8-done 
root+AEA-om-gta02:+AH4AIw alsactl -f alsa+AF8-fix+AF8-done store   

+AD4 +AD4 noticed that changeing +ACI-Capture Right Mix+ACI changes +ACI-Capture Left Mix+ACI in
+AD4 +AD4 paralell, but doesn't fix the audio path im my case.
+AD4 
+AD4 They're alises for the same underlying control for power purposes,
+AD4 although there's some gotchas there...

To me it seems that even with the same alsa state, the dapm state
depends on something else (such as the order in which this state was
reached).





More information about the openmoko-kernel mailing list