View: 34826|Reply: 39

[SOLVED] audio i2s with OpenElec

[Copy link]

4

threads

53

posts

2934

credits

Gold member

Rank: 6Rank: 6

credits
2934
Published in 2016-5-27 04:04:48 | Show all floors |Read mode
Edited by Giachi at 2016-6-6 03:06

Hello,
thank you very much for this project.
It0s running very well, but i'd like use a external dac board connected with I2S interface.
With other people we spoke about it and now  we know i2s dacs can work with Orange PI PC: link
I tested my dac with a customed debian version made frome users Jirm in Diyaduio forum , end the dac run well. So with armbian  i read the i2s dacs run ok.
I tested with OpenElec 7 (image made in May) but it not run.
I connected to the board with putty, and i try the comand cat /proc/asound/cards   but the system show me sndhdmi  , not snddaudio .
I see with openElec the comands apt-get not run (i wanted install the kernel source for add the module snddaudio).  Can you help me, or tell how i can modify OpenElec?


Thanks
bye

4

threads

1118

posts

9186

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9186
Published in 2016-6-22 23:43:06 | Show all floors
can someone, who uses i2s, post output of following commands:
  1. dmesg
  2. aplay -l
  3. aplay -L
Copy code

4

threads

53

posts

2934

credits

Gold member

Rank: 6Rank: 6

credits
2934
 Author| Published in 2016-6-3 02:51:18 | Show all floors
thanks.
For be sure i delated all OpenELEC-OPi2 folder, then:

1) Download the project with
  1. git clone -b openelec-7.0 --depth 1 https://github.com/jernejsk/OpenELEC-OPi2
Copy code


2)  went inside the new folder:
  1. cd OpenELEC-OPi2
Copy code


3) run
  1. git pull
Copy code

it replied
  1. Already up-to-date
Copy code


4) changed the file OpenELEC-OPi2/projects/H3/sys_config/opipc.fex

  1. [hdmi_cec]
  2. hdmi_cec_used = 0
Copy code

  1. [pcm0]
  2. daudio_used = 1
Copy code

  1. [w1_para]
  2. w1_used = 0
Copy code


5) changed in OpenELEC-OPi2/projects/H3/linux/linux.arm.conf

  1. CONFIG_SND_SUNXI_SOC_DAUDIO0_INTERFACE=y
  2. CONFIG_SND_SUNXI_SOC_DAUDIO0_PUBLIC_MACHINE=y
Copy code


6) comiple with
  1. PROJECT=H3 SYSTEM=opipc ARCH=arm make image
Copy code


now i am waiting because is necessary a lot of time for the download  of the need software for compile;
tomorow i will try the new image.
For now thanks

4

threads

1118

posts

9186

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9186
Published in 2016-5-27 05:26:57 | Show all floors
At this point, I'm really not sure, if daudio driver is compiled as module or it is build in. Did you try modprobing it? Another thing is that you have to change fex file for this, if I'm not mistaken.

OpenELEC is special in that way, that you can't change any files in filesystem, except in home folder. If you want to change anything, you have to change build script and build image on your own. Where to get it, it's described in FAQ topic.

4

threads

53

posts

2934

credits

Gold member

Rank: 6Rank: 6

credits
2934
 Author| Published in 2016-5-28 02:06:47 | Show all floors
tanks, i am looking FAQ topic. I will try to build a image

4

threads

53

posts

2934

credits

Gold member

Rank: 6Rank: 6

credits
2934
 Author| Published in 2016-6-1 19:48:39 | Show all floors
Hi Jernej,
i tried to rebuild OpenElec (downloaded from
  1. git clone -b openelec-7.0 --depth 1 https://github.com/jernejsk/OpenELEC-OPi2
Copy code
) changing the file OpenELEC-OPi2/projects/H3/sys_config/opipc.fex:

....
[pcm0]
daudio_used = 1   (before was zero)

[w1_para]
w1_used = 0   (because pin PI20 is used from i2s)

[twi1]
twi_used = 0  (because PI18 and PI19 are used from i2s)

the sistem start well, but audio i2s (should be snddaudio) is not enable:


when i access to sistem with ssh and i use
  1. aplay -l
Copy code

it show me

card0: audiocodec
card1: sndhmi

(i tried disable audiohub to
[audiohub]
hub_used = 0
but nothing is changed)

I read whit armbian opi pc i2s run ok;
so with This (post 37) i tried is ok.

with i2s ok the system should show
card1 [snddaudio ]: snddaudio - snddaudio
snddaudio

have you some idea what i'd can try?

4

threads

1118

posts

9186

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9186
Published in 2016-6-1 23:07:06 | Show all floors
Giachi replied at 2016-6-1 12:48
Hi Jernej,
i tried to rebuild OpenElec (downloaded from  ) changing the file OpenELEC-OPi2/projects/ ...

Changes seems ok, you don't have to disable audio hub, but if you want to be sure, then it's ok.

Main difference between Armbian and OpenELEC regarding this driver (daudio) is that Armbian has it built-in and OpenELEC has it as a module. You have to modprobe it. I don't know exact module name. You can search for it in /lib/modules and then load it using "modprobe <driver-name>". It may be that you have to load (modprobe) two drivers. Currently I can't check exact module names.

4

threads

53

posts

2934

credits

Gold member

Rank: 6Rank: 6

credits
2934
 Author| Published in 2016-6-2 01:01:28 | Show all floors
thanks.
The module is snddaudio0
i loaded it with
  1. modprobe snddaudio0
Copy code


but after when i  try
  1. dmesg
Copy code

it show
  1. [I2S]snddaudio cannot find any using configuration for controllers, return directly!
Copy code

4

threads

1118

posts

9186

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9186
Published in 2016-6-2 02:49:03 | Show all floors
hm... are you sure that your fex changes are taken into account? After every fex change, you have to clear kernel first with
  1. PROJECT=H3 ARCH=arm scripts/clean linux
Copy code
and then rebuild image.

or you can take easy way and just use fex2bin and bin2fex directly on fex file or, if you are using latest sources, script.bin.

BTW: it's more than one daudio file. Be sure at all of following are loaded:
  1. sndaudio0
  2. sunxi-daudiodma0
  3. sunxi-snddaudio0
  4. sunxi-daudio0
Copy code


loaded modules can be checked with "lsmod" and correct script.bin settings with for example "read_fex pcm0 daudio_used"

4

threads

53

posts

2934

credits

Gold member

Rank: 6Rank: 6

credits
2934
 Author| Published in 2016-6-2 15:01:26 | Show all floors
jernej replied at 2016-6-2 02:49
hm... are you sure that your fex changes are taken into account? After every fex change, you have to ...

maybe the error was I used the comand
  1. PROJECT=H3 SYSTEM=opipc ARCH=arm ./scripts/clean linux
Copy code
and no
  1. PROJECT=H3  ARCH=arm ./scripts/clean linux
Copy code


4

threads

53

posts

2934

credits

Gold member

Rank: 6Rank: 6

credits
2934
 Author| Published in 2016-6-2 15:02:52 | Show all floors
now i retry, thanks

4

threads

53

posts

2934

credits

Gold member

Rank: 6Rank: 6

credits
2934
 Author| Published in 2016-6-2 15:56:52 | Show all floors
jernej replied at 2016-6-2 02:49
hm... are you sure that your fex changes are taken into account? After every fex change, you have to ...


This thread contains more resources

You need to Log in to download or view,No account?    Register

x
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list