Jump to content

Valery Rezvyakov

Members
  • Posts

    15
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Valery Rezvyakov got a reaction from Christos in H3 I2S0 DT overlay   
    driver not support
    I2S slave on mainline H3/5
    https://github.com/nikkov/friendlyarm-linux/tree/sunxi-4.11.y
    https://github.com/ua3nbw-cf/orangepi_i2s
  2. Like
    Valery Rezvyakov got a reaction from Christos in Armbian 5.36 with kernel 4.14, on-board codec sound?   
    amixer -c 0 -q set "Line Out" 100%+ unmute amixer -c 0 -q set "DAC" 100%+ unmute  
  3. Like
    Valery Rezvyakov got a reaction from Christos in H3 I2S0 DT overlay   
    Get the source & create a simple Makefile:
    mkdir adau7002 cd adau7002 wget https://raw.githubusercontent.com/trsqr/media_tree/bd676c0c04ec94bd830b9192e2c33f2c4532278d/sound/soc/codecs/adau7002.c nano Makefile Makefile contents:
    obj-m := adau7002.o all: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules clean: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean install: sudo cp adau7002.ko /lib/modules/$(shell uname -r) sudo depmod -a Those indentations are a single tab character - use spaces & it won't work.
    Build:
    make all install Next, we create a new device tree overlay. Create a file i2s-soundcard-overlay.dts with this content:
     
    /dts-v1/; /plugin/; / { compatible = "allwinner,sun8i-h3"; fragment@0 { target-path = "/"; __overlay__ { adau7002_codec: adau7002_codec { #sound-dai-cells = <0>; compatible = "adi,adau7002"; status = "okay"; }; }; }; fragment@1 { target = <&i2s0>; __overlay__ { status = "okay"; pinctrl-0 = <&i2s0_pins>; sound-dai = <&adau7002_codec>; pinctrl-names = "default"; }; }; fragment@2 { target-path = "/"; __overlay__ { sound_i2s { compatible = "simple-audio-card"; simple-audio-card,format = "i2s"; simple-audio-card,name = "adau7002"; simple-audio-card,bitclock-slave = <&dailink0_slave>; simple-audio-card,frame-slave = <&dailink0_slave>; simple-audio-card,widgets = "Microphone", "Microphone Jack"; simple-audio-card,routing = "PDM_DAT", "Microphone Jack"; status = "okay"; simple-audio-card,cpu { sound-dai = <&i2s0>; }; dailink0_slave: simple-audio-card,codec { sound-dai = <&adau7002_codec>; }; }; }; }; }; Compile & install the overlay:
    armbian-add-overlay i2s-soundcard-overlay.dts Reboot and you'll have a microphone recording device
    root@orangepipc:~# arecord -l **** List of CAPTURE Hardware Devices **** card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: adau7002 [adau7002], device 0: 1c22000.i2s-adau7002-hifi adau7002-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 I don't have anything to test it with, but alsamixer shows a sound card with the chosen name and no controls, which is what you would expect.
    lsmod | grep snd
     
    root@orangepipc:~# lsmod | grep snd snd_soc_hdmi_codec 16384 1 snd_soc_simple_card 16384 0 snd_soc_adau7002 16384 1 snd_soc_simple_card_utils 16384 1 snd_soc_simple_card snd_soc_core 118784 7 snd_soc_adau7002,sun4i_codec,sun4i_i2s,sun8i_codec_analog,snd_soc_hdmi_codec,snd_soc_simple_card_utils,snd_soc_simple_card snd_pcm_dmaengine 16384 1 snd_soc_core snd_pcm 69632 4 sun4i_i2s,snd_pcm_dmaengine,snd_soc_hdmi_codec,snd_soc_core snd_timer 24576 1 snd_pcm snd 45056 3 snd_timer,snd_soc_core,snd_pcm soundcore 16384 1 snd  
  4. Like
    Valery Rezvyakov got a reaction from MitchD in H3 I2S0 DT overlay   
    make linux-menuconfig (by buildroot)
     
     Device Drivers
         ----->Sound card support
               ----->Advanced Linux Sound Archtecture
                     ------>ALSA for Soc audio support
                            --------->Allwinner Soc Audio support
                                     [*]Allwinner A10 I2S Support
    patch:
    diff --git a/sound/soc/sunxi/Kconfig b/sound/soc/sunxi/Kconfig index 22408bc..7842de4 100644 --- a/sound/soc/sunxi/Kconfig +++ b/sound/soc/sunxi/Kconfig @@ -30,8 +30,10 @@ config SND_SUN8I_CODEC_ANALOG config SND_SUN4I_I2S tristate "Allwinner A10 I2S Support" + depends on OF select SND_SOC_GENERIC_DMAENGINE_PCM select REGMAP_MMIO + select SND_SOC_PCM5102A help Say Y or M if you want to add support for codecs attached to the Allwinner A10 I2S. You will also need to select the On the Orange:
     
    dpkg -i linux-headers-next-sunxi_5.34_armhf.deb
     
    file sun8i-h3-I2S-out.dts :

    armbian-add-overlay sun8i-h3-I2S-out.dts
    reboot
    results:
    root@orangepipc:~# uname -a Linux orangepipc 4.13.12-sunxi #6 SMP Tue Nov 14 02:58:07 MSK 2017 armv7l GNU/Linux root@orangepipc:~# cat /proc/asound/cards 0 [I2Smaster ]: I2S-master - I2S-master I2S-master 1 [Codec ]: H3_Audio_Codec - H3 Audio Codec H3 Audio Codec 2 [allwinnerhdmi ]: allwinner_hdmi - allwinner,hdmi allwinner,hdmi root@orangepipc:~# dmesg |grep i2s [ 9.529374] asoc-simple-card sound_i2s: pcm5102a-hifi <-> 1c22000.i2s mapping ok [ 10.406113] asoc-simple-card sound: i2s-hifi <-> 1c22800.i2s mapping ok root@orangepipc:~# aplay -l **** List of PLAYBACK Hardware Devices **** card 0: I2Smaster [I2S-master], device 0: 1c22000.i2s-pcm5102a-hifi pcm5102a-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: allwinnerhdmi [allwinner,hdmi], device 0: 1c22800.i2s-i2s-hifi i2s-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0  
  5. Like
    Valery Rezvyakov got a reaction from Christos in H3 I2S0 DT overlay   
    make linux-menuconfig (by buildroot)
     
     Device Drivers
         ----->Sound card support
               ----->Advanced Linux Sound Archtecture
                     ------>ALSA for Soc audio support
                            --------->Allwinner Soc Audio support
                                     [*]Allwinner A10 I2S Support
    patch:
    diff --git a/sound/soc/sunxi/Kconfig b/sound/soc/sunxi/Kconfig index 22408bc..7842de4 100644 --- a/sound/soc/sunxi/Kconfig +++ b/sound/soc/sunxi/Kconfig @@ -30,8 +30,10 @@ config SND_SUN8I_CODEC_ANALOG config SND_SUN4I_I2S tristate "Allwinner A10 I2S Support" + depends on OF select SND_SOC_GENERIC_DMAENGINE_PCM select REGMAP_MMIO + select SND_SOC_PCM5102A help Say Y or M if you want to add support for codecs attached to the Allwinner A10 I2S. You will also need to select the On the Orange:
     
    dpkg -i linux-headers-next-sunxi_5.34_armhf.deb
     
    file sun8i-h3-I2S-out.dts :

    armbian-add-overlay sun8i-h3-I2S-out.dts
    reboot
    results:
    root@orangepipc:~# uname -a Linux orangepipc 4.13.12-sunxi #6 SMP Tue Nov 14 02:58:07 MSK 2017 armv7l GNU/Linux root@orangepipc:~# cat /proc/asound/cards 0 [I2Smaster ]: I2S-master - I2S-master I2S-master 1 [Codec ]: H3_Audio_Codec - H3 Audio Codec H3 Audio Codec 2 [allwinnerhdmi ]: allwinner_hdmi - allwinner,hdmi allwinner,hdmi root@orangepipc:~# dmesg |grep i2s [ 9.529374] asoc-simple-card sound_i2s: pcm5102a-hifi <-> 1c22000.i2s mapping ok [ 10.406113] asoc-simple-card sound: i2s-hifi <-> 1c22800.i2s mapping ok root@orangepipc:~# aplay -l **** List of PLAYBACK Hardware Devices **** card 0: I2Smaster [I2S-master], device 0: 1c22000.i2s-pcm5102a-hifi pcm5102a-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: allwinnerhdmi [allwinner,hdmi], device 0: 1c22800.i2s-i2s-hifi i2s-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0  
  6. Like
    Valery Rezvyakov got a reaction from tkaiser in CoovaChilli and Freeradius for a Wifi Hotspot with captive portal   
    Hello everyone, today I would like to show you how to compile CoovaChilli and Freeradius for a Wifi Hotspot with captive portal on an Orange Pi PC  (or PC Plus). I'm writing this because I couldn't find anything related to this topic on the internet, so I wrote this not very detailed guide.
     
    wget https://raw.githubusercontent.com/ua3nbw/opihotspot/master/opihotspot_debian.sh chmod +x opihotspot_debian.sh ./opihotspot_debian.sh Russian version https://ua3nbw.ru/all/orangepi-coovachilli-and-freeradius-for-a-wifi-hotspot-with-capt/
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines