Where can I get the sourcecode with audio for iMX233-OLinuXino-MINI-WiFi ?

Started by firawk, October 27, 2016, 05:03:18 AM

Previous topic - Next topic

JohnS

Go to product page, follow links.

Or use a web search.

It will take time and effort.  A lot is available, if you try.

John

firawk

Quote from: JohnS on October 27, 2016, 12:25:59 PM
Go to product page, follow links.

Or use a web search.

It will take time and effort.  A lot is available, if you try.

John

I have tried a lot, but sadly no support sound.
Please give me some sources address. thank you!

JohnS

Are you trying to say that none of the software supports any audio?

John

firawk

Quote from: JohnS on October 27, 2016, 03:40:01 PM
Are you trying to say that none of the software supports any audio?

John

Yes. That's exactly what I'm talking about.

JohnS

Unless you post details (yes, details) of what you tried and what happened you make it hard for anyone to help.

John

swahren

I assume you're searching for the i.MX233 builtin audio driver. I ported the driver to compile with Linux Mainline 3.19 and higher. Here is the git repo (branch: sound):

https://github.com/lategoodbye/linux-mxs-power/tree/sound

firawk

Quote from: swahren on October 27, 2016, 06:41:32 PM
I assume you're searching for the i.MX233 builtin audio driver. I ported the driver to compile with Linux Mainline 3.19 and higher. Here is the git repo (branch: sound):

https://github.com/lategoodbye/linux-mxs-power/tree/sound

Thank you very much.I will try.

firawk

Quote from: swahren on October 27, 2016, 06:41:32 PM
I assume you're searching for the i.MX233 builtin audio driver. I ported the driver to compile with Linux Mainline 3.19 and higher. Here is the git repo (branch: sound):

https://github.com/lategoodbye/linux-mxs-power/tree/sound

I merge the patch to my buildroot(from https://github.com/xythobuz/camcorder-buildroot) for imx233, but it can't work.Could you tell me how to debug?
here is the log:

U-Boot 2016.03 (Nov 01 2016 - 10:24:26 +0800)

CPU:   Freescale i.MX23 rev1.4 at 454 MHz
BOOT:  SSP SD/MMC #0
DRAM:  64 MiB
MMC:   MXS MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
Checking for: /boot/uEnv.txt ...
19 bytes read in 111 ms (0 Bytes/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
loading /boot/vmlinuz-olinuxino ...
3091394 bytes read in 1098 ms (2.7 MiB/s)
loading /boot/dtbs/imx23-olinuxino.dtb ...
9490 bytes read in 158 ms (58.6 KiB/s)
debug: [console=ttyAMA0,115200 root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait fixrtc] ...
debug: [bootz 0x42000000 - 0x41000000] ...
Kernel image @ 0x42000000 [ 0x000000 - 0x2f06b0 ]
## Flattened Device Tree blob at 41000000
   Booting using the fdt blob at 0x41000000
   Loading Device Tree to 43b5d000, end 43b62511 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.18.6 (yezhizhan@ubuntu) (gcc version 4.9.3 (Buildroot 2016.05) ) #1 Tue Nov 1 10:26:33 CST 2016
[    0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine model: i.MX23 Olinuxino Low Cost Board
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 58836K/65536K available (4182K kernel code, 170K rwdata, 1336K rodata, 136K init, 199K bss, 6700K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc056bc2c   (5520 kB)
[    0.000000]       .init : 0xc056c000 - 0xc058e000   ( 136 kB)
[    0.000000]       .data : 0xc058e000 - 0xc05b8be0   ( 171 kB)
[    0.000000]        .bss : 0xc05b8be0 - 0xc05ea968   ( 200 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836480000000ns
[    0.000000] Console: colour dummy device 80x30
[    0.070000] Calibrating delay loop... 227.32 BogoMIPS (lpj=1136640)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080000] CPU: Testing write buffer coherency: ok
[    0.080000] Setting up static identity map for 0x403fb3c0 - 0x403fb418
[    0.080000] devtmpfs: initialized
[    0.090000] pinctrl core: initialized pinctrl subsystem
[    0.090000] regulator-dummy: no parameters
[    0.100000] NET: Registered protocol family 16
[    0.100000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.130000] Serial: AMBA PL011 UART driver
[    0.130000] 80070000.serial: ttyAMA0 at MMIO 0x80070000 (irq = 17, base_baud = 0) is a PL011 rev2
[    0.280000] console [ttyAMA0] enabled
[    0.310000] mxs-dma 80004000.dma-apbh: initialized
[    0.320000] mxs-dma 80024000.dma-apbx: initialized
[    0.320000] usb0_vbus: 5000 mV
[    0.330000] SCSI subsystem initialized
[    0.330000] usbcore: registered new interface driver usbfs
[    0.340000] usbcore: registered new interface driver hub
[    0.340000] usbcore: registered new device driver usb
[    0.350000] Linux video capture interface: v2.00
[    0.350000] pps_core: LinuxPPS API ver. 1 registered
[    0.360000] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.360000] PTP clock support registered
[    0.370000] Advanced Linux Sound Architecture Driver Initialized.
[    0.380000] Switched to clocksource mxs_timer
[    0.390000] cfg80211: Calling CRDA to update world regulatory domain
[    0.430000] NET: Registered protocol family 2
[    0.440000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.450000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.450000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.460000] TCP: reno registered
[    0.460000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.470000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.480000] NET: Registered protocol family 1
[    0.480000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.530000] msgmni has been set to 114
[    0.540000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.550000] io scheduler noop registered
[    0.560000] io scheduler deadline registered
[    0.560000] io scheduler cfq registered (default)
[    0.570000] of_dma_request_slave_channel: dma-names property of node '/apb@80000000/apbx@80040000/serial@80070000' missing or empty
[    0.580000] uart-pl011 80070000.serial: no DMA platform data
[    0.590000] 8006c000.serial: ttyAPP0 at MMIO 0x8006c000 (irq = 146, base_baud = 1500000) is a 8006c000.serial
[    0.600000] mxs-auart 8006c000.serial: Found APPUART 3.0.0
[    0.600000] [drm] Initialized drm 1.1.0 20060810
[    0.610000] usbcore: registered new interface driver asix
[    0.620000] usbcore: registered new interface driver ax88179_178a
[    0.630000] usbcore: registered new interface driver cdc_ether
[    0.630000] usbcore: registered new interface driver smsc95xx
[    0.640000] usbcore: registered new interface driver net1080
[    0.650000] usbcore: registered new interface driver cdc_subset
[    0.650000] usbcore: registered new interface driver zaurus
[    0.660000] usbcore: registered new interface driver cdc_ncm
[    0.660000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.670000] usbcore: registered new interface driver usb-storage
[    0.680000] ci_hdrc ci_hdrc.0: doesn't support gadget
[    0.690000] ci_hdrc ci_hdrc.0: EHCI Host Controller
[    0.690000] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
[    0.720000] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
[    0.720000] hub 1-0:1.0: USB hub found
[    0.730000] hub 1-0:1.0: 1 port detected
[    0.730000] mousedev: PS/2 mouse device common for all mice
[    0.740000] stmp3xxx-rtc 8005c000.rtc: rtc core: registered 8005c000.rtc as rtc0
[    0.750000] i2c /dev entries driver
[    0.760000] usbcore: registered new interface driver usbtv
[    0.760000] stmp3xxx_rtc_wdt stmp3xxx_rtc_wdt: initialized watchdog with heartbeat 19s
[    0.770000] 80010000.ssp supply vmmc not found, using dummy regulator
[    0.820000] mxs-mmc 80010000.ssp: initialized
[    0.820000] ledtrig-cpu: registered to indicate activity on CPUs
[    0.840000] usbcore: registered new interface driver usbhid
[    0.840000] usbhid: USB HID core driver
[    0.860000] TCP: cubic registered
[    0.870000] NET: Registered protocol family 17
[    0.880000] stmp3xxx-rtc 8005c000.rtc: setting system clock to 1970-01-01 00:10:52 UTC (652)
[    0.890000] mmc0: host does not support reading read-only switch, assuming write-enable
[    0.900000] ALSA device list:
[    0.900000]   No soundcards found.
[    0.900000] mmc0: new high speed SDHC card at address 59b4
[    0.910000] Waiting for root device /dev/mmcblk0p2...
[    0.920000] mmcblk0: mmc0:59b4 00000 7.47 GiB
[    0.920000]  mmcblk0: p1 p2
[    1.020000] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    1.030000] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[    1.050000] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[    1.060000] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.070000] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.080000] devtmpfs: mounted
[    1.090000] Freeing unused kernel memory: 136K (c056c000 - c058e000)
[    1.200000] hub 1-1:1.0: USB hub found
[    1.210000] hub 1-1:1.0: 4 ports detected
[    1.230000] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Starting mdev...
[    1.490000] usb 1-1.4: new high-speed USB device number 3 using ci_hdrc
[    1.900000] rtl8192cu: Chip version 0x10
[    2.360000] rtl8192cu: MAC address: 48:02:2a:eb:1f:47
[    2.360000] rtl8192cu: Board Type 0
[    2.380000] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[    2.380000] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[    2.400000] usb 1-1.4: Direct firmware load for rtlwifi/rtl8192cufw_TMSC.bin failed with error -2
[    2.400000] usb 1-1.4: Direct firmware load for rtlwifi/rtl8192cufw.bin failed with error -2
[    2.410000] rtlwifi: Loading alternative firmware rtlwifi/rtl8192cufw.bin
[    2.420000] rtlwifi: Firmware rtlwifi/rtl8192cufw_TMSC.bin not available
[    2.430000] usbcore: registered new interface driver rtl8192cu
Initializing random number generator... [    4.590000] random: dd urandom read with 23 bits of entropy available
done.
Starting network...

Welcome to the CamCorder
olinuxino login: [  110.850000] random: nonblocking pool is initialized

firawk

Sorry , it's my mistake.  imx23-olinuxino-audio.dts was missing. Now it works,but amixer can't work.
please help me~~~~~

# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: mxsbuiltinaudio [mxs-builtin-audio], device 0: MXS ADC/DAC mxs-builtin-codec-dai-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
#
#
# amixer
[  193.150000] Unable to handle kernel NULL pointer dereference at virtual address 0000004c
[  193.160000] pgd = c3a34000
[  193.160000] [0000004c] *pgd=43a78831, *pte=00000000, *ppte=00000000
[  193.160000] Internal error: Oops: 17 [#1] ARM
[  193.160000] Modules linked in: rtl8192cu rtl_usb rtl8192c_common rtlwifi
[  193.160000] CPU: 0 PID: 107 Comm: amixer Not tainted 3.18.6 #1
[  193.160000] task: c3b40000 ti: c3a8c000 task.ti: c3a8c000
[  193.160000] PC is at dac_get_volsw+0xc/0x78
[  193.160000] LR is at snd_ctl_ioctl+0x584/0xb24
[  193.160000] pc : [<c02ff6b8>]    lr : [<c02de9b8>]    psr: a0000013
[  193.160000] sp : c3a8deb0  ip : c3abd430  fp : bec03854
[  193.160000] r10: bec03550  r9 : c3a8c000  r8 : c3992d7c
[  193.160000] r7 : c3992ec0  r6 : c3abd400  r5 : c39a5800  r4 : 00000001
[  193.160000] r3 : 00000000  r2 : 00000000  r1 : c3abd400  r0 : c39a5800
[  193.160000] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  193.160000] Control: 0005317f  Table: 43a34000  DAC: 00000015
[  193.160000] Process amixer (pid: 107, stack limit = 0xc3a8c1b8)
[  193.160000] Stack: (0xc3a8deb0 to 0xc3a8e000)
[  193.160000] dea0:                                     00000001 c02de9b8 c4968000 c3992d7c
[  193.160000] dec0: 00000000 0000000b 0000000b 0000000b 00eb61e0 00000000 00000000 00000000
[  193.160000] dee0: 00000000 00000000 00000000 c059bcac 00000005 c0010424 b6f5f60c c3a8dfb0
[  193.160000] df00: bec03550 0000000b bec03854 bec03550 c3984d40 c3ae1820 00000003 00000003
[  193.160000] df20: c3a8c000 00000000 bec03854 c00aff40 c05982b4 c3b19000 00000000 00000000
[  193.160000] df40: 00020002 00000003 00000020 c3b19000 c3ae1820 c3ae1828 00000003 00000020
[  193.160000] df60: c3b19000 c009fd94 c3ae1820 c3ae1820 bec03550 c3ae1820 c2c85512 00000003
[  193.160000] df80: c3a8c000 00000000 bec03854 c00b0118 00000000 bec03550 00000018 00000036
[  193.160000] dfa0: c00096e4 c0009580 00000000 bec03550 00000003 c2c85512 bec03550 00000000
[  193.160000] dfc0: 00000000 bec03550 00000018 00000036 000000a8 bec03550 00000007 bec03854
[  193.160000] dfe0: b6f85d14 bec03520 b6ef79a4 b6e3b354 60000010 00000003 00000000 00000000
[  193.160000] [<c02ff6b8>] (dac_get_volsw) from [<c02de9b8>] (snd_ctl_ioctl+0x584/0xb24)
[  193.160000] [<c02de9b8>] (snd_ctl_ioctl) from [<c00aff40>] (do_vfs_ioctl+0x39c/0x540)
[  193.160000] [<c00aff40>] (do_vfs_ioctl) from [<c00b0118>] (SyS_ioctl+0x34/0x5c)
[  193.160000] [<c00b0118>] (SyS_ioctl) from [<c0009580>] (ret_fast_syscall+0x0/0x2c)
[  193.160000] Code: e12fff1e e92d4010 e5903060 e5933054 (e593304c)
[  193.380000] ---[ end trace c7d4c24fd8d91b48 ]---

swahren

Sorry for this inconvenience.

You could try this repo which contains a newer version:

https://github.com/lategoodbye/linux-lcd6610

Please aware this is work in progress and uses the imx23-olinuxino.dts

firawk

Quote from: swahren on November 02, 2016, 09:31:31 PM
Sorry for this inconvenience.

You could try this repo which contains a newer version:

https://github.com/lategoodbye/linux-lcd6610

Please aware this is work in progress and uses the imx23-olinuxino.dts


Okay. it works.
new issue is happen. After i use 'mplayer' some times, Audio device got stuck!

log:
# mplayer  1.wav
MPlayer 1.2-4.9.3 (C) 2000-2015 MPlayer Team

Playing 1.wav.
libavformat version 56.40.101 (internal)
Audio only file format detected.
Load subtitles in ./
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       
Audio device got stuck!
A:   0.0 (00.0) of 263.0 (04:23.0) ??,?%                                       



[AO_ALSA] alsa-lib: pcm_hw.c:649:(snd_pcm_hw_drain) SNDRV_PCM_IOCTL_DRAIN failed (-5): Input/output error


Exiting... (End of file)
#   

dmesg log:
....
[    5.900000] wlan0: associated
[    5.900000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[    6.940000] DRBG: Continuing without Jitter RNG
[   62.020000] random: nonblocking pool is initialized
[  806.820000] ADC underflow detected
[  812.270000] ADC underflow detected
[  813.890000] ADC overflow detected
[  816.860000] ADC underflow detected
[  822.420000] ADC underflow detected
[  826.990000] ADC underflow detected
[ 1009.900000] ADC overflow detected
[ 1011.570000] ADC underflow detected
[ 1013.930000] ADC underflow detected
[ 1016.680000] ADC underflow detected
[ 1016.760000] ADC underflow detected

use 'aplay' some times, Input/output error happen.

#
# aplay 1.wav
Playing WAVE '1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
^CAborted by signal Interrupt...
^C
# aplay 1.wav
Playing WAVE '1.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: pcm_write:1940: write error: Input/output error

swahren

Sorry, this might be a know issues:

Take a look at the several sound threads here:

https://www.olimex.com/forum/index.php?topic=704.0

https://www.olimex.com/forum/index.php?topic=4110

I didn't investigate it further i've the suspicion that the sound clock rate runs async to the sound file.

firawk

Quote from: swahren on November 07, 2016, 12:11:09 AM
Sorry, this might be a know issues:

Take a look at the several sound threads here:

https://www.olimex.com/forum/index.php?topic=704.0

https://www.olimex.com/forum/index.php?topic=4110

I didn't investigate it further i've the suspicion that the sound clock rate runs async to the sound file.


Oh, but the issue is not happened when i use Newest official Arch Linux image(https://www.olimex.com/wiki/images/6/6d/Imx233_kernel_2.6_ARCH_FS_WIFI_release_5.torrent)
Why?  :'( :'( :'(

Could you tell me where can I get the sourcecode of Imx233_kernel_2.6_ARCH_FS_WIFI_release?