Welcome, Guest

Author Topic: Linux 3.7 ALSA sound support for iMX233?  (Read 42359 times)

Fabio Estevam

  • Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #15 on: July 04, 2013, 04:50:41 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

  • Newbie
  • *
  • Posts: 16
  • Karma: +1/-0
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #16 on: July 24, 2013, 02:19:08 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

  • Newbie
  • *
  • Posts: 17
  • Karma: +3/-0
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #17 on: July 25, 2013, 02:41:51 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

  • Newbie
  • *
  • Posts: 16
  • Karma: +1/-0
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #18 on: July 25, 2013, 05:10:30 PM »
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
Code: [Select]
git diff v3.10 > awesome_patch_everyone_is_waiting.patch;-)

Grawp

  • Newbie
  • *
  • Posts: 17
  • Karma: +3/-0
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #19 on: July 29, 2013, 09:22:48 PM »
https://github.com/ITserve/imx23-audio.git

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

wigyori

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-0
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #20 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-

Grawp

  • Newbie
  • *
  • Posts: 17
  • Karma: +3/-0
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #21 on: July 30, 2013, 03:35:47 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

  • Newbie
  • *
  • Posts: 16
  • Karma: +1/-0
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #22 on: July 30, 2013, 04:35:12 PM »
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

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-0
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #23 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-

Fabio Estevam

  • Newbie
  • *
  • Posts: 31
  • Karma: +0/-0
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #24 on: July 30, 2013, 11:42:22 PM »
Good job!

Is anyone planning to submit this upstream?

Regards,

Fabio Estevam

Grawp

  • Newbie
  • *
  • Posts: 17
  • Karma: +3/-0
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #25 on: July 31, 2013, 11:10:53 AM »
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.
« Last Edit: August 01, 2013, 10:44:36 AM by Grawp »

djchristos

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #26 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!

TioRuben

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #27 on: August 10, 2013, 08:21:51 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

  • Newbie
  • *
  • Posts: 21
  • Karma: +0/-0
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #28 on: August 10, 2013, 09:14:16 PM »
Hi Grawp,

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

Thx,
-w-

lambda

  • Full Member
  • ***
  • Posts: 180
  • Karma: +21/-0
    • Support my work
Re: Linux 3.7 ALSA sound support for iMX233?
« Reply #29 on: August 10, 2013, 09:36:07 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.