LineOut

首先根据硬件电路,确定哪个GPIO连接到功放的使能引脚:

修改 DTS 的 sound 节点,设置 amp-gpio:

        sound {
            compatible = "sstar,audio";
//          reg = <0x1F000000 0x1000000>;
            interrupts=<GIC_SPI INT_IRQ_BACH IRQ_TYPE_LEVEL_HIGH>;
            playback-volume-level=<64>;    //0~94
            capture-volume-level=<64>;
           // micin-pregain-level=<1>;    //0~3
            micin-pregain-level=<0>;    //0~3
            micin-gain-level=<3>;    //0~7
            linein-gain-level=<2>;  //0~7
            amp-gpio = <PAD_FUART_RX 1>;
            clocks = <&CLK_upll_384m>;
           // playback-dma-buffer=<98304>; //512(ms)*48(kHz)*2(ch)*2(16bits)
           // capture-dma-buffer=<122880>; //640(ms)*48(kHz)*2(ch)*2(16bits)
            digmic-padmux = <2>;
            i2s-padmux = <2>;
            keep-i2s-clk = <0>;
            status = "ok";
        }

同时,修改对应的infinity2m-ssc011a-s01a-padmux-xxx.dtsi,取消PAD_GPIO10的其他复用功能,使其默认作为GPIO_MODE。
这样配置后,我们就可以使用LineOut了。下面使用audio_all_test_case程序来测试:

# ./audio_all_test_case -t 10 -O -i ./pizzicato.wav -D 0 -V 10
文档更新时间: 2020-12-29 14:36   作者:Aeeditor