All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rick Mann <rmann@latencyzero.com>
To: Caleb Crome <caleb@crome.org>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: Kernel Device Tree entries for simple-audio-card
Date: Tue, 29 Sep 2015 11:41:14 -0700	[thread overview]
Message-ID: <869D210F-8882-4067-8593-18B2BE3197E8@latencyzero.com> (raw)
In-Reply-To: <532A774B-EA9D-4633-B7B4-4236746B92FE@crome.org>

Ugh, sorry. Here you go:

https://github.com/JetForMe/podtique/blob/v1/bbb/cape/Podtique1/BB-ENABLE-PRU.dts

Sent from my iPhone

> On Sep 29, 2015, at 07:08, Caleb Crome <caleb@crome.org> wrote:
> 
> You need to fix the mclk rate first I think, then the pll settings should fall in line.  The DTS you sent still has the simple-audio-card and not the da830 stuff in it.
> 
> Caleb
> 
> Sent from my iPhone
> 
>> On Sep 29, 2015, at 1:28 AM, Rick Mann <rmann@latencyzero.com> wrote:
>> 
>> Okay, so I switched to da830-evm-audio, and things are much better. But still not perfect. Here's the DTS:
>> 
>>   https://github.com/JetForMe/podtique/blob/master/bbb/cape/Podtique1/BB-ENABLE-PRU.dts
>> 
>> Now I have a working MCLK, and I see clocking on BCLK and WCLK, but the rates are questionable. MCLK is 24 MHz (even though in the DTS it's set to 12 MHz); that might be okay. For the following call:
>> 
>>   # speaker-test -r 22050 -c 2 -f 1000 -F S16_LE -t sine -s 1 -D hw:0,0
>> 
>> WCLK is 11.88 kHz, and it is pulses (DSP mode), rather than high for left, low for right for each channel's word. BCLK is 379.5 kHz.
>> 
>> I'm looking at the i2c commands being sent to see if I can determine what the CODEC thinks it's trying to do.
>> 
>>>> On Sep 28, 2015, at 23:42 , Caleb Crome <caleb@crome.org> wrote:
>>>> 
>>>> 
>>>> Could you send me your DTS?
>>> 
>>> Yes, but I have modified a bit of stuff in the davinci-evm.c to make
>>> my multi-codec setup work right.
>>> 
>>> I turned off HDMI with this:
>>> 
>>> commit 7f20ffd56de6921bc5f8e2fee8da75d743d57847
>>> Author: Caleb Crome <caleb@signalessence.com>
>>> Date:   Wed Sep 9 13:33:36 2015 -0700
>>> 
>>>  turn off hdmi from boneblack
>>> 
>>> diff --git a/arch/arm/boot/dts/am335x-boneblack.dts
>>> b/arch/arm/boot/dts/am335x-boneblack.dts
>>> index 5c42d25..6335072 100644
>>> --- a/arch/arm/boot/dts/am335x-boneblack.dts
>>> +++ b/arch/arm/boot/dts/am335x-boneblack.dts
>>> @@ -34,51 +34,9 @@
>>> };
>>> 
>>> &am33xx_pinmux {
>>> - nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins {
>>> - pinctrl-single,pins = <
>>> - 0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
>>> - 0xa0 0x08       /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xa4 0x08       /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xa8 0x08       /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xac 0x08       /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xb0 0x08       /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xb4 0x08       /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xb8 0x08       /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xbc 0x08       /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xc0 0x08       /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xc4 0x08       /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xc8 0x08       /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xcc 0x08       /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xd0 0x08       /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xd4 0x08       /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xd8 0x08       /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xdc 0x08       /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
>>> - 0xe0 0x00       /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
>>> - 0xe4 0x00       /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
>>> - 0xe8 0x00       /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
>>> - 0xec 0x00       /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 |
>>> AM33XX_PIN_OUTPUT */
>>> - >;
>>> - };
>>> - nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins {
>>> - pinctrl-single,pins = <
>>> - 0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
>>> - >;
>>> - };
>>> -};
>>> -
>>> -&lcdc {
>>> - status = "okay";
>>> };
>>> 
>>> / {
>>> - hdmi {
>>> - compatible = "ti,tilcdc,slave";
>>> - i2c = <&i2c0>;
>>> - pinctrl-names = "default", "off";
>>> - pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
>>> - pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
>>> - status = "okay";
>>> - };
>>> };
>>> 
>>> &rtc {
>>> 
>>> 
>>> 
>>> And here's the added bit:
>>> 
>>> Index: KERNEL/arch/arm/boot/dts/am335x-boneblack.dts
>>> ===================================================================
>>> --- KERNEL.orig/arch/arm/boot/dts/am335x-boneblack.dts 2015-09-21
>>> 17:23:14.961343604 -0700
>>> +++ KERNEL/arch/arm/boot/dts/am335x-boneblack.dts 2015-09-22
>>> 09:35:49.308278239 -0700
>>> @@ -5,11 +5,25 @@
>>> * it under the terms of the GNU General Public License version 2 as
>>> * published by the Free Software Foundation.
>>> */
>>> +
>>> +
>>> +
>>> +/*
>>> +   * MCASP pin mapping
>>> +   *                          ball   BBB
>>> +   * MCASP0_ACLKX             A13    P9.31
>>> +   * MCASP0_AFSX              B13    P9.29
>>> +   * MCASP0_AXR2  (mcasp OUT) C12    P9.28
>>> +   * MCASP0_AXR3  (mcasp IN)  A14    P9.25
>>> +*/
>>> +
>>> /dts-v1/;
>>> 
>>> #include "am33xx.dtsi"
>>> #include "am335x-bone-common.dtsi"
>>> 
>>> +
>>> +
>>> / {
>>> model = "TI AM335x BeagleBone Black";
>>> compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
>>> @@ -34,9 +48,119 @@
>>> };
>>> 
>>> &am33xx_pinmux {
>>> + i2c2_pins_default: i2c2_pins_default {
>>> +        pinctrl-single,pins = <
>>> +                0x17c ( PIN_INPUT_PULLUP | MUX_MODE3 ) /* (D17)
>>> uart1_rtsn.I2C2_SCL */
>>> +                0x178 ( PIN_INPUT_PULLUP | MUX_MODE3 ) /* (D18)
>>> uart1_ctsn.I2C2_SDA */
>>> +        >;
>>> + };
>>> +
>>> +
>>> + i2c1_pins_default: pinmux_i2c1_pins {
>>> +                       pinctrl-single,pins = <
>>> +                               0x158 0x72      /*
>>> uart1_ctsn.i2c2_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE2 */
>>> +                               0x15c 0x72      /*
>>> uart1_rtsn.i2c2_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE2 */
>>> +                       >;
>>> +        };
>>> +
>>> + mcasp_0_pins_default: mcasp_0_pins_default {
>>> + pinctrl-single,pins = <
>>> + 0x190 ( PIN_INPUT | MUX_MODE0 ) /* (A13) mcasp0_aclkx.mcasp0_aclkx */
>>> + 0x194 ( PIN_INPUT | MUX_MODE0 ) /* (B13) mcasp0_fsx.mcasp0_fsx */
>>> + 0x19c ( PIN_OUTPUT | MUX_MODE2 ) /* (C12) mcasp0_ahclkr.mcasp0_axr2 */
>>> + 0x1ac ( PIN_INPUT | MUX_MODE2 ) /* (A14) mcasp0_ahclkx.mcasp0_axr3 */
>>> + >;
>>> + };
>>> +};
>>> +
>>> +
>>> +&i2c1 {
>>> + clock-frequency = <100000>;
>>> + status = "okay";
>>> + pinctrl-names = "default";
>>> + pinctrl-0 = <&i2c1_pins_default>;
>>> + status="okay";
>>> +
>>> + tlv320aic3x_a: tlv320aic3x@18 {
>>> + compatible = "ti,tlv320aic3x";
>>> + reg = <0x18>;
>>> + tdm-offset = <0>;
>>> + status = "okay";
>>> + };
>>> +
>>> + tlv320aic3x_b: tlv320aic3x@19 {
>>> + compatible = "ti,tlv320aic3x";
>>> + reg = <0x19>;
>>> + tdm-offset = <32>;
>>> + status = "okay";
>>> + };
>>> +
>>> + tlv320aic3x_c: tlv320aic3x@1a {
>>> + compatible = "ti,tlv320aic3x";
>>> + reg = <0x1a>;
>>> + tdm-offset = <64>;
>>> + status = "okay";
>>> + };
>>> +
>>> + tlv320aic3x_d: tlv320aic3x@1b {
>>> + compatible = "ti,tlv320aic3x";
>>> + reg = <0x1b>;
>>> + tdm-offset = <96>;
>>> + status = "okay";
>>> + };
>>> +
>>> };
>>> 
>>> +&mcasp0 {
>>> + pinctrl-names = "default";
>>> + pinctrl-0 = <&mcasp_0_pins_default>;
>>> + status = "okay";
>>> +
>>> + op-mode = <0>;          /* MCASP_IIS_MODE */
>>> + tdm-slots = <16>;
>>> + num-serializer = <16>;
>>> + serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
>>> + 0 0 1 2
>>> + 0 0 0 0
>>> + 0 0 0 0
>>> + 0 0 0 0
>>> + >;
>>> + tx-num-evt = <1>;
>>> + rx-num-evt = <1>;
>>> +};
>>> +
>>> +
>>> / {
>>> + sound {
>>> + compatible = "ti,da830-evm-audio";
>>> + ti,model = "PUPPY-AUDIO";
>>> + ti,audio-codec = <
>>> +       &tlv320aic3x_a
>>> +       &tlv320aic3x_b
>>> +       &tlv320aic3x_c
>>> +       &tlv320aic3x_d
>>> +       >;
>>> + ti,mcasp-controller = <&mcasp0>;
>>> + ti,codec-clock-rate = <12288000>;
>>> + ti,audio-routing =
>>> + "Headphone Jack",       "a HPLOUT",
>>> + "Headphone Jack",       "a HPROUT",
>>> + "Headphone Jack",       "b HPLOUT",
>>> + "Headphone Jack",       "b HPROUT",
>>> + "Headphone Jack",       "c HPLOUT",
>>> + "Headphone Jack",       "c HPROUT",
>>> + "Headphone Jack",       "d HPLOUT",
>>> + "Headphone Jack",       "d HPROUT",
>>> + "a LINE1L",               "Line In",
>>> + "a LINE1R",               "Line In",
>>> + "b LINE1L",               "Line In",
>>> + "b LINE1R",               "Line In",
>>> + "c LINE1L",               "Line In",
>>> + "c LINE1R",               "Line In",
>>> + "d LINE1L",               "Line In",
>>> + "d LINE1R",               "Line In";
>>> + status="okay";
>>> + };
>>> };
>>> 
>>> &rtc {
>>> _______________________________________________
>>> Alsa-devel mailing list
>>> Alsa-devel@alsa-project.org
>>> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>> 
>> 
>> -- 
>> Rick Mann
>> rmann@latencyzero.com
>> 
>> 

  reply	other threads:[~2015-09-29 18:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-26  5:57 Kernel Device Tree entries for simple-audio-card Rick Mann
2015-09-27 21:52 ` Caleb Crome
2015-09-28  5:14   ` Rick Mann
2015-09-28 16:11     ` Caleb Crome
2015-09-28 18:55       ` Rick Mann
2015-09-28 22:22         ` Caleb Crome
2015-09-28 22:34           ` Rick Mann
2015-09-28 23:46             ` Caleb Crome
2015-09-29  0:08               ` Rick Mann
2015-09-29  6:27                 ` Caleb Crome
2015-09-29  6:31                   ` Rick Mann
2015-09-29  6:42                     ` Caleb Crome
2015-09-29  8:28                       ` Rick Mann
2015-09-29 14:08                         ` Caleb Crome
2015-09-29 18:41                           ` Rick Mann [this message]
2015-10-01 15:38                             ` Caleb Crome
2015-10-02  9:55                               ` Rick Mann
2015-10-02 15:25                                 ` Caleb Crome
2015-10-02 22:32                                   ` Rick Mann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=869D210F-8882-4067-8593-18B2BE3197E8@latencyzero.com \
    --to=rmann@latencyzero.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=caleb@crome.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.