alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* Sound record on Devkit8000 with DT boot issue
@ 2013-02-10 15:21 Anil Kumar
  2013-02-11 13:17 ` Peter Ujfalusi
  0 siblings, 1 reply; 5+ messages in thread
From: Anil Kumar @ 2013-02-10 15:21 UTC (permalink / raw)
  To: linux-kernel, devicetree-discuss, alsa-devel
  Cc: tony, thomas, perex, tiwai, lrg, Peter Ujfalusi

Hi All,

I am working on Devkit8000 and adding DT support for that. I am trying
to add sound DT node support for this boards.
I have nearly done with this but facing issue on record. I do not have
much knowledge of twl4030 audio codec but with
small Hack[1] (as MainMic connected to the input jack)  i am able to
record sound on Devkit8000.
I do not know that MICBIAS1_EN can be enable by amixer commands.
Could you please help me to get out of this ?


1) Hack [1]

diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 63b280b..6780681 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -1473,7 +1473,7 @@ static const struct snd_soc_dapm_widget
twl4030_dapm_widgets[] = {
        SND_SOC_DAPM_SUPPLY("micbias2 select", TWL4030_REG_MICBIAS_CTL, 6, 0,
                            NULL, 0),

-       SND_SOC_DAPM_MICBIAS("Mic Bias 1", TWL4030_REG_MICBIAS_CTL, 0, 0),
+       SND_SOC_DAPM_MICBIAS("Mic Bias 1", TWL4030_REG_MICBIAS_CTL, 0, 1),
        SND_SOC_DAPM_MICBIAS("Mic Bias 2", TWL4030_REG_MICBIAS_CTL, 1, 0),
        SND_SOC_DAPM_MICBIAS("Headset Mic Bias", TWL4030_REG_MICBIAS_CTL, 2, 0),


2) Sound DT node patch for Devkit8000

diff --git a/arch/arm/boot/dts/omap3-
devkit8000.dts b/arch/arm/boot/dts/omap3-devkit8000.dts
index dc59272..5f3eec0 100644
--- a/arch/arm/boot/dts/omap3-devkit8000.dts
+++ b/arch/arm/boot/dts/omap3-devkit8000.dts
@@ -44,11 +44,22 @@
                 };

        };
+
+       sound {
+               compatible = "ti,omap-twl4030";
+               ti,model = "devkit8000";
+
+               ti,mcbsp = <&mcbsp2>;
+               ti,codec = <&twl_audio>;
+       };
 };

 &omap3_pmx_core {
        pinctrl-names = "default";
-       pinctrl-0 = <&i2c1_pins>;
+       pinctrl-0 = <
+                       &i2c1_pins
+                       &mcbsp2_pins
+               >;

        leds_pins: pinmux_led_pins {
                pinctrl-single,pins = <
@@ -65,6 +76,21 @@
                        0x18c 0x118     /* I2C1_SDA */
                 >;
        };
+
+       mcbsp2_pins: pinmux_mcbsp2_pins {
+                pinctrl-single,pins = <
+                       /*
+                        * MCBSP2_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT,
+                        * MCBSP2_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT
+                        */
+                       0x10c 0x01000100
+                       /*
+                        * MCBSP2_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT,
+                        * MCBSP2_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT
+                        */
+                       0x110 0x00000100
+               >;
+       };
 };

 &i2c1 {
@@ -74,6 +100,14 @@
                reg = <0x48>;
                interrupts = <7>;       /* SYS_NIRQ cascaded to intc */
                interrupt-parent = <&intc>;
+
+               twl_audio: audio {
+                       compatible = "ti,twl4030-audio";
+                       codec {
+                               ti,ramp_delay_value = <3>;
+                               ti,offset_cncl_path = <0x31>;
+                       };
+               };
        };
 };

3) Playback amixer commands
   amixer set 'PredriveR Mixer AudioR2' on
   amixer set 'PredriveL Mixer AudioL2' on
   amixer set PreDriv 100 unmute
   amixer set 'DAC2 Digital Fine' 100

Thanks,
Anil

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-02-12  3:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-10 15:21 Sound record on Devkit8000 with DT boot issue Anil Kumar
2013-02-11 13:17 ` Peter Ujfalusi
2013-02-11 17:58   ` Anil Kumar
2013-02-11 18:14     ` Peter Ujfalusi
2013-02-12  3:20       ` Anil Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).