Jump to content

bananapi M2 ULTRA


constantius

Recommended Posts

Hello
On the bananapi forum I noticed Igor's post (2018/08/22) that is for download image for bananapi m2 ultra. Support is not provided. I have a question about the sound device. This one directly from the SOC R40 is not supported and no one is working on it as.

I spied this in the matrix for allwinner. But I use an external sound card on usb https://www.hardkernel.com/main/products/prdt_info.php?g_code=G141629380416. It works with every kernel and single board. And here in the case of the 4.18 kernel and bananapi m2 ultra, there are problems with getting connected to the pulseaudio server; which does not work at all. Is there a chance that this will be corrected. Or rather, this version of armbian dev which has gone out no further development will not be anymore. 

Link to comment
Share on other sites

Hi Constantius I can enable bananpi M2 ultra sound (headphone and mic on pcb)  You must add this on the dtsi file.

 

        dma: dma-controller@01c02000 {
            compatible = "allwinner,sun8i-h3-dma";
            reg = <0x01c02000 0x1000>;
            interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
            clocks = <&ccu CLK_BUS_DMA>;
            resets = <&ccu RST_BUS_DMA>;
            #dma-cells = <1>;
        };

        codec: codec@01c22c00 {
            #sound-dai-cells = <0>;
            compatible = "allwinner,sun8i-h3-codec";
            reg = <0x01c22c00 0x300>;
            interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
            clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_CODEC>;
            clock-names = "apb", "codec";
            resets = <&ccu RST_BUS_CODEC>;
            dmas = <&dma 19>, <&dma 19>;
            dma-names = "rx", "tx";
            allwinner,codec-analog-controls = <&codec_analog>;
            allwinner,audio-routing =
                "Headphone", "HP",
                "LINEIN", "Line In",
                "MIC1",    "MBIAS",
                "MIC1", "Mic",
                "MIC2", "HBIAS",
                "MIC2", "Headset Mic";
            status = "okay";
        };

        codec_analog: codec-analog@01c22f00 {
            compatible = "allwinner,sun8i-a23-codec-analog";
            reg = <0x01c22f00 0x4>;
        };

 

Then modules that must be loaded are

 

sun8i_codec_analog     24576  1
sun4i_codec            32768  3
snd_soc_core          118784  2 sun4i_codec,sun8i_codec_analog
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_pcm                65536  2 snd_pcm_dmaengine,snd_soc_core
snd_timer              24576  1 snd_pcm
snd                    45056  3 snd_timer,snd_soc_core,snd_pcm
soundcore              16384  1 snd

 

to test the player execute that to check the sound

$ aplay /usr/share/sounds/alsa/Front_Center.wav

 

then execute

$ alsamixer

to control the volumen and gain and to enable mic do that.

 

1) open alsamixer;
2) press "tab" to switch to capture;
3) press "bar" on the first capture channel;
"L_____R" red sign should appear;
4) select by arrow key MIC as the source of the first
input source;
2) record a test file:
arecord -f cd -D hw:0,0 -d 10 test.wav
play it back to test i.e.:

mplayer test.wav

 

Thats all ...

 

best regards Asimov

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines