November 15, 2019, 01:04:19 am

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - kevin

1
Quote from: fatman on January 19, 2014, 08:26:58 am
Hi Slovenia,

Really appreciate your passion on developing the CT image...
Btw, some people told me that Realtime kernel is better to use in CAS env., Can you give me some advices how to install the RT kernel into your image?

thx


Look here http://www.cubieforums.com/index.php/topic,797.0.html
I'm also interested for CAS using CT.
I tested RT image with above patch-set, it works but I could not differentiate between RT and non-RT image so far. Maybe I don't have golden-ears. ;D
2
Hi nikkov,

Great news!! BTW, maybe you can use format "S24_LE" not "S24_3LE".
Did you already do with "S24_LE"?
And do we need to modify HW to pull out I2S signal?
Is it CN9 for connection to external DAC?
Again, thanks for your great work!!
3
Hi nikkov,
Good to hear to load the module.
But how do you pull out the I2S signal out of the box?
In the script.fex file, there are four I2S signal ports from PB05 to PB08.
So far, I don't know which port goes to which pin of which connector on the PCB.
I was looking at the schematic diagram of A20 SoC and I suspect the connector is CN9 and the last four pins of that.
If I am right, you could test with I2S input DAC or logic analyzer.
One more thing, would you play real sound file using MPD with output plugin ALSA?
Also configure MPD logging option "verbose" and see what happen?
It will tell you what's going on even if you don't get sound from it.
4
Quote from: kryoz on January 11, 2014, 04:44:19 pm
I've been trying to compile kernel with i2s module but stiil have no luck.
There were many things I discovered about this process and now I have a kernel with i2s module but looks like it doesn't start at all. syslog reports nothing when i do modprobe sunxi-sndi2s.
Also I couldn't make to work wi-fi module  :-\
I'll appreciate any help but .config for make can be the best option.

Hi kryoz,

Compilation of I2S module itself is not an issue I guess.
When loading the module, it refused to load with some error.
It needs to be done something in I2S module source code.
Would you provide me what happen when you load the module?

Thanks.
5
Quote from: HaikuZen on January 10, 2014, 09:56:07 am
Hi Kevin,
I'm also interested in the topic.
I also would like have I2S kernel enabled in android. ;)

Did you heard about HiFiBerry for Raspberri PI? http://www.hifiberry.com/
Do you think the pins are compatibles?

Hello HaikuZen,

I heard about that DAC before but I don't think it's compatible with cubieboard in terms of HW and SW.
Because RPi and Cubieboard has different HW spec.
6
Quote from: kryoz on January 10, 2014, 06:55:31 am
Quote from: kevin on January 10, 2014, 03:39:15 am
Hi kryoz,

Glad to hear from you because it's counting up one more person to have interest for audio use. ;D
BTW, my original thought was to pull out I2S signal out of the CT via expansion port and connect to external DAC directly.
Otherwise IMHO, you need to use usb-to-I2S converter and then connect it to external DAC.(I2S input capable one)
If your DAC can have I2S input, you can give it a try but it's not that easy I guess. ;)


Hi  8)

At first I have to solve another problem which is in progress now - implement i2s input in the DAC. I contacted with DAC developer and he gladly helped me with necessary information. The trick can be only with i2s format. DAC can accept only right justified.
Can we manipulate with output i2s format?

And a small offtopic. I've got USB-SPDIF converter with async mode (CM6631A chip) and external power supply. I was sure about its superb quality comparing to all internal soundcards on PC motherboards. But I was surprised when CT's optical SPDIF revealed even better quality. My best explanation is that power supply does really matter. Obviously in CT case it's much cleaner then in PCs.


Hi kryoz,

How is modification going?
Yes, CT's SPDIF output quality is good. I'm running mpd with small cheap DAC(up to 24/192) for my music listening.
But I have pop noise when I stop or forward between tracks with HD audio file.(like 24bit 96khz)
Do you have any experience like this?
7
Quote from: kryoz on January 10, 2014, 02:49:22 am
I really interested in progress about enabling I2S for CT but I'll be satisfied even in 16/44.1 because I prefer old multibit parallel DACs. I have an intention for tweaking my USB/SPDIF DAC with AD1866 on board to grab i2s source.


Hi kryoz,

Glad to hear from you because it's counting up one more person to have interest for audio use. ;D
BTW, my original thought was to pull out I2S signal out of the CT via expansion port and connect to external DAC directly.
Otherwise IMHO, you need to use usb-to-I2S converter and then connect it to external DAC.(I2S input capable one)
If your DAC can have I2S input, you can give it a try but it's not that easy I guess. ;)
8
Hi nikkov,

There are lots of things to explain why I recompile I2S kernel module even though I'm not used to do that. :'(
But you know, it's fun to do and great chance to learn a lot for about HD audio in Linux world etc.
Anyway, I used following kernel source and method;

1. For kernel source I used
    https://github.com/cubieboard2/linux-sunxi/tree/sunxi-3.4-ct-v101
2. For compiling the kernel and module, read the following
    http://dl.cubieboard.org/docs/How_to_make_a_cubieboard_system.pdf
3. For I2S module compile
    - You need to do some modification of "Kconfig" file at
       https://github.com/cubieboard2/linux-sunxi/blob/sunxi-3.4-ct-v101/sound/soc/Kconfig to include I2S driver source code when you compile the kernel or
    - You can choose the option to include I2S driver as module or built-in in the kernel when you compile the kernel by "menuconfig'.

Before compiling the kernel, you need read carefully #2 step and any relevant information about kernel compiling in this forum or googling whatever in the internet. ;)
Also you may need to look at this http://ubuntuone.com/3DhPanhzINWVGnQijjXWa0 in section 1.13, 5.2, 6.9 and 6.10 for about audio related information on A20 based cubieboard.

I know I can use usb DAC/converter for HD audio. This may be the most simplest way to do but it cost from tenth to a few hundreds of dollars depending on the device.
If the cubieboard can handle the I2S signal properly, one can play HD audio easily by connecting I2S capable DAC.(there are a lots of cheap I2S DACs in the market)
But it seems like a lot of people have interest other than HD audio on cubieboard. :'(
If you have any question or anything your own way about audio feature, let's share to improve this community!

Thanks.

Kevin.
9
Quote from: nikkov on January 09, 2014, 07:30:57 am
Hi,

I also want to use I2S to connect an external DAC. Kevin, have you any progress?

Hello nikkov,

Like GeorgeIoak said above, there are SW-side issues to handle 24-bit sound.
Unlike everybody else in this forum, I'm not developer so not used to modifying the kernel or sound driver.
The HW(A20 SoC) itself has 24-bit processing feature but not SW so far.
What I know and tested so far about 24-bit sound on Cubieboard as follow;

1. 16-bit sound is OK (up to 192khz sample rate)
2. 24-bit sound playable but it showed bit depth 16-bit like "S16_LE" on ALSA. (up to 192khz sample rate)
3. I recompiled the I2S module in CT which is disabled by default. And then, when I loaded I2S module, the system showed error message something like as follow;
    - [ccu-error] clk_enabled:invalid handle
    - [ccu-error] clk_set_parent:invalid handle try to set parent of i2s_moduleclk to i2s_pll2ck failed line=603
    - [ccu-err] clk_disabled:invalid handle

For above #2, I don't know my CT can play 24-bit sound correctly because "cat /proc/asound/card1/pcm0p1/sub0/hw_param" showed sound format "S16_LE" which is should be "S24_LE".
For above #3, even though I don't know how to configure I2S from scratch, I just give it a try but no luck.
All the testing was done with digital out(SPDIF).
10
Unless you play the sound file thorough card1, you won't get any signal from spdif connector.
So if you want to play through card1, you should specify which cards to run on your sound application.
For example, if you use mpd, you can edit output device section like "hw:1,0" which means to use HW card1 sub-device 0 in /etc/mpd.conf file.
11
You can check CT's schematic which A20 SoC's pin goes to expansion header's pin(CN8 & 9)
With that, I guess pin #18,20,22,24 are for MCLK,BCLK,LRCLK,SDO of I2S on CN9 connector.
Coresponding ports are PB5,6,7,8 for each I2S signal respectively.
But it seems like sharing those four pins with TVIN & AC97.
At this point, I don't know how to do about sharing situation.
Also there is SW issue, in the sound related source file /sound/soc/sunxi/Kconfig,
it said sun7i(A20) platform needs to be adjust various thing to comple the I2S source.
But no comment or description what is various thing to be done.
Anyway, I modified Kconfig file to include I2S source and re-compiled the kernel and modules.
And reboot, booted normally but kernel refused to load I2S with some error.
It seems like some clocking issue.
I'll post detailed error message soon when I get back to my office.
12
Quote from: tbenr on December 10, 2013, 06:29:48 am
have you look at this?

fex config:
http://linux-sunxi.org/Fex_Guide#i2c_configuration

expansion ports reference, to match the A20 PIOs:
http://linux-sunxi.org/A20-Cubietruck

Hello tbenr,

Yes, I have already.
But I don't know how to do, what is exactly related with those things.
I tested a lot of times with my CT to play HD music over the last couple of month.
As a casual user but love to listen to the music very much with these compact, cheap and good solution, I have very much interest to play with CT. ;)
13
In the A20 user manual digital audio section.
It said, two digital audio method, one is I2S and the other is legacy PCM.
PCM support 8 or 16bit sample rate 8~192kHz, I2S support 8~24bit sample rate same as PCM.
I found out, in the sound source, same as I said.
What I like to know is how to configure I2S on cubieboard(1,2,3) in terms of both HW/SW perspective.
There are no info. docs so far from cubietech or Allwinner.
AFAIK, HDMI & I2S are different sound architecture.
As for HDMI, it needs dedicated receiver for video and audio.
And it's expensive for HD video & audio.
I love music, and A20's internal I2S can provide cheap and good(HD audio) solution.
14
Beginners / Re: How to get S/PDIF on Cubietruck to work
December 04, 2013, 09:08:16 am
Quote from: ykanello on December 04, 2013, 04:15:39 am
~# cat /proc/asound/card1/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 1
rate: 48000 (48000/1)
period_size: 6000
buffer_size: 24000

You are right when is playing I can see the hw parameters.
Too bad I am in the office and I cannot hear if it is playing at the moment or not :)


If it showed like above, it's working.
And the error message you mentioned from MPD log, that because there is no HW mixer for SPDIF sound card so far as far as I know.
But you can play the music and you should control your volume etc. on your external pre-amp or power amp.
15
Quote from: halfur on December 04, 2013, 05:38:46 am
hmm. If you somehow manage to get the I2S working you'll probably need something to convert the I2S to SPDIF though, the Wolfson WM8804 seems to be an appropiate IC for that.

Somehow adding 24bit support for the sndspdif module seems almost easier.


Hi halfur,

Maybe you are right. I use lubuntu server distros for my CT. And found in A20 user manual that it doesn't support 24bit in SPDIF mode but it does in I2S mode.
Also I found in kernel source sound part, it does not configured to compile I2S sound source on CT which is I don't know why even though there is I2S sound source.
And also I found out pins to connect to external DAC for I2S signal on CN9 connector on my CT.
So I am trying to re-compile the kernel and modules with I2S enabled.
If it works, I can transmit the I2S signal to external DAC. There are many cheap I2S input, analog out(RCA) DAC out there.
But it's not easy to modify the source and re-compile cause I'm not developer. I'm just casual user who have much interest to play music on cubieboard.

So anyway, do you know how to do modify the source and re-compile etc.?
If you do, would you guide me how to do? And I'll let you know what I found so far in detail.