How to set default audio playback

I have connected 3.5mm audio jack to DB410c as per Qualcomm’s audio connector guide and I can hear audio on my headphone but I want to change default audio to Speaker P and M which is Analog Connector Pin 0 and Pin 1.

There is a hint in the guide written as follows at page 11

You should be able to hear playback on the earphone connected to the stereo connector.
Playback using Android Music player would normally play the audio over HDMI, as this is the
default setting.
To change the default behavior, edit the file
device/qcom/MSM8916_32/mixer_paths_sbc.xml based on the use case and push the file
into DragonBoard 410c via adb to /system/etc/.

I have located the file


But could not figure out where should I change to make Speaker default audio playback. I am using Android 5.1.1.
In meantime, I am also trying to install AOSP but as of now, I am stuck with Android 5.1.1.

@doitright would you please look into it.

Somehow I got it working. Analog pic at Inp2 i.e. ADC2 is working fine and HPL & HPR worked like a charm. I had also routed audio to the speaker by adding following lines in

    <ctl name="RX3 MIX1 INP1" value="RX1" />
    <ctl name="SPK DAC Switch" value="1" />

But I can not control audio volume at the speaker. Either it is playing in full volume or it is being mute. Moreover, I am having two problems.

  1. How can I control speaker volume?
  2. How can I increase the gain of the mic? It is working fine but I would like to increase its gain a little more.