This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/WL1835MODCOM8B: HFPM Demo App Not Working

Part Number: WL1835MODCOM8B
Other Parts Discussed in Thread: TLV320AIC3106, AM4372

Tool/software: Linux

I am trying to run the WL18xx TI Bluetooth Stack HFPM Demo App, but it seems like the audio route patch link is broken. When I click on it it just sits there forever and eventually times out. Is this still the correct patch that I need to route the audio correctly? If not, what do I need to do in order to route the Bluetooth audio correctly?

  • Are, you using AM335 or AM437x EVM? You would need additional changes/patches to configure McASP ports for PCM and and ALSA codec driver for the same. Did, you make these changes?

    Thanks
  • AM437x EVM

    No, I haven't configured McASP or ALSA for Bluetooth audio. Is that done via the .dts file?
  • It is little more complicated.. Please check the instructions here..
    processors.wiki.ti.com/.../WL18xx_TI_Bluetooth_Stack_HFPM_Demo_App

    Thanks
  • Yes, those are the directions that I was following but the link to the patch on that website is broken. Is that patch needed?
  • Please check this thread. The patches are attached.. You may need to modify for your kernel version..

    e2e.ti.com/.../764929

    Thanks
  • I tried running that patch, but it looked like there were some merging errors which caused it to fail. I tried looking at the patch file itself to see if I could figure out what it was trying to do, and this is what I have for the audio routing in the .dts file, does this look correct?

    sound0: sound0 {
    compatible = "simple-audio-card";
    simple-audio-card,name = "AM437x-GP-EVM";

    simple-audio-card,widgets =
    "Headphone", "Headphone Jack",
    "Line", "Line In";
    simple-audio-card,routing =
    "Headphone Jack", "HPLOUT",
    "Headphone Jack", "HPROUT",
    "LINE1L", "Line In",
    "LINE1R", "Line In";
    simple-audio-card,format = "dsp_b";
    simple-audio-card,bitclock-master = <&sound0_master>;
    simple-audio-card,frame-master = <&sound0_master>;
    simple-audio-card,bitclock-inversion;

    simple-audio-card,cpu {
    sound-dai = <&mcasp1>;
    system-clock-frequency = <12000000>;
    };

    sound0_master: simple-audio-card,codec {
    sound-dai = <&tlv320aic3106>;
    system-clock-frequency = <12000000>;
    };
    };

    wilink8_pcm: wilink8_pcm {
    #sound-dai-cells = <0>;
    compatible = "ti,wilink8_bt";
    status = "okay";
    };

    sound1: sound1 {
    compatible = "simple-audio-card";
    simple-audio-card,name = "WILINK-BT";
    simple-audio-card,format = "i2s";
    simple-audio-card,bitclock-master = <&wilink8_bt_codec>;
    simple-audio-card,frame-master = <&wilink8_bt_codec>;

    simple-audio-card,cpu {
    sound-dai = <&mcasp0>;
    system-clock-frequency = <12000000>;
    };

    wilink8_bt_codec: simple-audio-card,codec {
    sound-dai = <&wilink8_pcm>;
    system-clock-frequency = <12000000>;
    };
    };

    audio_mstrclk: mclk_osc {
    compatible = "fixed-clock";
    #clock-cells = <0>;
    clock-frequency = <12000000>;
    };

    mcasp0_pins: mcasp0_pins {
    pinctrl-single,pins = <
    AM4372_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE6) /* (F7) gpmc_a8.mcasp0_aclkx */
    AM4372_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE6) /* (B4) gpmc_a9.mcasp0_fsx */
    AM4372_IOPAD(0x868, PIN_OUTPUT_PULLDOWN | MUX_MODE6) /* (G8) gpmc_a10.mcasp0_axr0 */
    AM4372_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE6) /* (D8) gpmc_a11.mcasp0_axr1 */
    >;
    };

    mcasp0_sleep_pins: mcasp0_sleep_pins {
    pinctrl-single,pins = <
    AM4372_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE7)
    AM4372_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE7)
    AM4372_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE7)
    AM4372_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    >;
    };

    mcasp1_pins: mcasp1_pins {
    pinctrl-single,pins = <
    AM4372_IOPAD(0x908, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mii1_col.mcasp1_axr2 */
    AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */
    AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */
    AM4372_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */
    >;
    };

    mcasp1_sleep_pins: mcasp1_sleep_pins {
    pinctrl-single,pins = <
    AM4372_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE7)
    AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
    AM4372_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)
    >;
    };

    &mcasp0 {
    #sound-dai-cells = <0>;
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&mcasp0_pins>;
    pinctrl-1 = <&mcasp0_sleep_pins>;

    status = "okay";

    op-mode = <0>; /* MCASP_IIS_MODE */
    tdm-slots = <2>;
    /* 4 serializers */
    serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
    1 2 0 0
    >;
    tx-num-evt = <32>;
    rx-num-evt = <32>;
    };

    &mcasp1 {
    #sound-dai-cells = <0>;
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&mcasp1_pins>;
    pinctrl-1 = <&mcasp1_sleep_pins>;

    status = "okay";

    op-mode = <0>; /* MCASP_IIS_MODE */
    tdm-slots = <2>;
    /* 4 serializers */
    serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
    0 0 1 2
    >;
    tx-num-evt = <32>;
    rx-num-evt = <32>;
    };
  • We, have not tried these patches on the recent kernel releases. I am not very familiar with kernel codec driver bindings.. Please, check how any other audio codecs are configured.. I will also look a bit into it..

    Thanks
  • I actually got it working today, thank you for your help.
  • Great. Can, you post changes done to the patches to get it working?

    Thanks
  • The only changes I had to make were some formatting of the mcasp0 pins int .dts file. For example, instead of listing a pin as:

    0x60 (PIN_INPUT_PULLDOWN | MUX_MODE6),

    I had to list it like this:

    AM4372_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE6).

    I'm not really sure why, but I need to add 8 to the most significant bit in the hex value. I have to do this for any hex value for a pin that I get from the Pinmux tool, and I don't know what the reasoning is for that.

    But other than that I just had to make all of the changes manually that the patch was trying to implement. For some reason when I tried to run the patch it failed but I was able to look through the patch file to see what it was trying to do and make those changes manually.

    One other thing I found in the HFPM Demo App wiki was in step 3, it say to run the command: "ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make modules_install INSTALL_MOD_PATH=/media/<username>/rootfs" from the [SDK install dir], but I had to run it in the [SDK install dir]/board-support/linux-.... directory.