How to avoid invalid ioctl cmd! problem on imx6ul evk

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to avoid invalid ioctl cmd! problem on imx6ul evk

Jump to solution
1,580 Views
phanikumar
Contributor III

Hi, I want to use asrc on imx6ul evk board using linux. I got a sample driver code from net. Every things works fine till the line below

if ((err = ioctl(fd_asrc, ASRC_CONVERT, &buf_info)) < 0)

My buf_info structure variable is correct with proper input  and output buffer lengths, as well as input and output buffer pointers(they are not null). But still I am getting the following error in the teraterm..

#define ASRC_CONVERT_IOW(ASRC_IOC_MAGIC, 3, struct asrc_convert_buffer)

error log:

root@linaro-ubuntu-desktop:~# fsl-asrc 2034000.asrc: invalid ioctl cmd!

Unable to handle kernel NULL pointer dereference at virtual address 00000000

pgd = 849b4000

[00000000] *pgd=89b50831, *pte=00000000, *ppte=00000000

Internal error: Oops: 817 [#3] PREEMPT SMP ARM

Modules linked in:

CPU: 0 PID: 2064 Comm: atc_sr_hw.elf Tainted: G      D      3.14.38-6UL_ga+ge4944a5 #1

task: 85356400 ti: 87aa2000 task.ti: 87aa2000

PC is at __memzero+0x24/0x80

LR is at 0x0

pc : [<8028f6e4>]    lr : [<00000000>]    psr: 20000013

sp : 87aa3e44  ip : 00000000  fp : 8412fb00

r10: 00000000  r9 : 8412fb00  r8 : 00000000

r7 : 8412fb00  r6 : 87aa3ee0  r5 : 00000000  r4 : 894735c0

r3 : 00000000  r2 : 00000000  r1 : 0002ffc0  r0 : 00000000

Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user

Control: 10c53c7d  Table: 849b406a  DAC: 00000015

Process atc_sr_hw.elf (pid: 2064, stack limit = 0x87aa2238)

Stack: (0x87aa3e44 to 0x87aa4000)

3e40:          80585294 00000002 00000010 883ba600 88351a10 00000000 00000000

3e60: 00000000 00000000 883ba600 894735c0 00000004 00000040 894735c0 00200000

3e80: 894735c0 8071deec 883ba600 803609dc 00000008 88351a10 00000060 80584d30

3ea0: 00000004 00000000 00000000 88351a10 7eaba5b8 88351a10 87aa2000 00000000

3ec0: 894735c0 80586e7c 87aa3ee0 87aa2008 00000000 8071deec 89c43e88 8030f0a8

3ee0: 76c31008 769b2008 00001000 00001178 7eaba5e4 80071ff4 855116c8 00000002

3f00: 00000011 8847d600 00000002 8834e648 7eaba5b8 88a7ca80 40104303 00000003

3f20: 87aa2000 00000000 7eaba5e4 800e9dd8 00000000 00000000 00000000 00000000

3f40: 81c8fe3c 855116c0 00000011 86d91dc0 00000002 855116c8 87aa2000 00000000

3f60: 7eaba5e4 800da1c4 00000000 88a7ca80 7eaba5b8 88a7ca80 40104303 00000003

3f80: 87aa2000 00000000 7eaba5e4 800e9fcc 00000000 7eaba648 0000870c 00000036

3fa0: 8000e5e4 8000e460 00000000 7eaba648 00000003 40104303 7eaba5b8 7eaba5b8

3fc0: 00000000 7eaba648 0000870c 00000036 00000000 00000000 76f61000 7eaba5e4

3fe0: 00012ba4 7eaba5ac 00008e74 76eca92c 20000010 00000003 00378c00 00358d00

Code: e52de004 e1a0c002 e1a0e002 e2511040 (a8a0500c)

---[ end trace 5b7b3d0bf550318b ]---

Can some one please let me know how to resolve this problem. Thanks in advance..

1 Solution
1,061 Views
phanikumar
Contributor III

Finally, it has got solved. The problem is due to incompatible mxc_asrc.h file. I was using wrong file.

View solution in original post

0 Kudos
2 Replies
1,062 Views
phanikumar
Contributor III

Finally, it has got solved. The problem is due to incompatible mxc_asrc.h file. I was using wrong file.

0 Kudos
1,061 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

Thanks for sharing your solution. It will be very helpful.

Best Regards,

Alejandro