Linux 3.7 ALSA sound support for iMX233?

Started by guanx, January 19, 2013, 06:28:10 am

Previous topic - Next topic

Fabio Estevam

Quote from: Grawp on July 04, 2013, 04:19:00 pm
Quote from: ggilles on July 04, 2013, 03:24:06 pm
This is really great!
Is there any chance of getting a patch before this enters the mainline?

I am looking forward to try this, and I am afraid it will take some time before the driver makes it into linux...

Either way, thank you for your quick answer.


Well you don't have to wait for mainline kernel. The driver will get to kernel/git/next/linux-next.git and even before that it will land in some development branch affiliated to the MXS or ASoC maintainer. At least I think so. I really don't have any experience with the process.
Just wait for the next week. I'll have more informations. I'm cleaning the code right now anyway.


Yes, this is correct.

The flow is:

- You submit the patch into alsa-devel mailing list adding the ASoC maintainer (Mark Brown).
- People review your patch and make comments
- When Mark is happy with the patch, it will be applied into his ASoC tree
- His tree is synced with linux-next
- It will be then merged in the next merge window (kernel 3.12)

Let me know if you need help with the submission process.

Good job!

Regards,

Fabio Estevam

ggilles

Quote from: Grawp on July 04, 2013, 02:40:47 pm
I'm sorry I completely forgot to report updates here.

I do have working audio output and input, full-duplex! (Just MIC, Line-in doesn't work yet).
I'll be posting patch to mxs ASoC maintainers when the code is clean&pretty enough (that should be next week).

About setting temporary git repository with the driver.... I would have to consult my employer. But I hope that the driver could make it to Linux by the end of the next week or week after next week. I don't know how often maintainers review patches and when they are merged. I have no experience contributing to Linux yet!

PS: The driver is written for 3.10 kernel.


Hi Grawp,
did you make any progress on this?

-- Gilles

PS: sorry to bother you again about this, it is just that I really want to get audio working

Grawp

Quote from: ggilles on July 24, 2013, 02:19:08 pm
Hi Grawp,
did you make any progress on this?

-- Gilles

PS: sorry to bother you again about this, it is just that I really want to get audio working


I'm sorry. I haven't had much time to deal with it recently. We will set up a public git repository with the driver on Monday.

ggilles

Grawp,
this is really great news.

If you are lacking time to setup a git repository, please consider sending a simple patch against kernel v3.10
git diff v3.10 > awesome_patch_everyone_is_waiting.patch
;-)

Grawp

https://github.com/ITserve/imx23-audio.git

You should find option for MXS builtin driver in menuconfig.
Please report any bugs.

wigyori

Hi Grawp,

I think this is missing the DTS entries, could you please push them as well.

Thanks,
-w-

Grawp

Quote from: wigyori on July 30, 2013, 12:52:09 pm
Hi Grawp,

I think this is missing the DTS entries, could you please push them as well.

Thanks,
-w-


I've just added them. Use imx23-audio.dts or just copy the entries from it. They should work, but I can not guarantee it. I'll test it later... or just tell me if they work.

ggilles

Grawp,
I have just finished compiling your kernel, added the dts entries, reboot, and IT WORKS!!

Thank you SO much for sharing this!  :D

Best regards,

wigyori

Nice work Grawp, works flawlessly. :)  I see a couple todos in the code - do you need any help on those?

I'll push this into openwrt trunk so it would get some further testing, if you don't have objections.

Thanks,
-w-

Fabio Estevam

Good job!

Is anyone planning to submit this upstream?

Regards,

Fabio Estevam

Grawp

July 31, 2013, 11:10:53 am #25 Last Edit: August 01, 2013, 10:44:36 am by Grawp
Quote from: wigyori on July 30, 2013, 11:38:08 pm
Nice work Grawp, works flawlessly. :)  I see a couple todos in the code - do you need any help on those?

I'll push this into openwrt trunk so it would get some further testing, if you don't have objections.

Thanks,
-w-


There are actually more TODOs. I'll summarize them and push them to git as comments or as separate text files. Help would by appreciated then :) .

Just for quick info:
There are issues as not switching of the mic bias when recording is not active (register logic, values are used from 2.6 driver), no PM, register handling could be more elegant (regmap MMIO may be used).

I certainly don't have any objections against pushing the driver to openwrt trunk.

djchristos

Can someone help me with getting the driver working on my iMX233 running arch linux?
I have tried the following with no success
Quote
git clone https://github.com/ITserve/imx23-audio.git
Cloning into 'imx23-audio'...
remote: Counting objects: 3143799, done.
remote: Compressing objects: 100% (626375/626375), done.
fatal: Out of memory, calloc failed
fatal: index-pack failed

Thanks!

TioRuben

Quote from: djchristos on August 02, 2013, 05:22:56 pm
Can someone help me with getting the driver working on my iMX233 running arch linux?
I have tried the following with no success
Quote
git clone https://github.com/ITserve/imx23-audio.git
Cloning into 'imx23-audio'...
remote: Counting objects: 3143799, done.
remote: Compressing objects: 100% (626375/626375), done.
fatal: Out of memory, calloc failed
fatal: index-pack failed

Thanks!

Seems you are trying to compile kernel in olinuxino directly. Surely it won't work or will take a very, very, very long time, as the available RAM isn't enough and processor is not very fast. The best you can do is to compile in a Linux PC (i.e. with Debian). You can follow this guide http://www.jann.cc/2012/08/23/building_a_kernel_3_x_for_the_olinuxino_from_sources.html but, instead of cloning koliqi git, clone ITserve Git repo

wigyori

Hi Grawp,

Do you have the todo list? :)  I guess a couple people are awaiting it. :)

Thx,
-w-

lambda

Quote from: TioRuben on August 10, 2013, 08:21:51 pm
Seems you are trying to compile kernel in olinuxino directly. Surely it won't work or will take a very, very, very long time, as the available RAM isn't enough and processor is not very fast.


Actually it shouldn't be that bad as the kernel is written in C which compiles on reasonably small RAM (compared to C++). I've compiled u-boot natively before and it was pretty fast (about 15 minutes). I would be surprised if compiling a kernel with a reasonable selection of modules took more then say an hour or so.

OTOH the git kernel repository is enormous and cloning it (and most other git operations) on the olinuxino will lead to trouble. Either do the git operations on some other HW or use a snapshot of a specific version.

HTH,
Harald

BTW: Now I mostly use openwrt for development work which is great except for one thing: I'd really like to edit the device tree natively on the olinuxino instead of writing a new kernel image every time.