problems in /proc read and alsamixer
Hi,
I'm working on an Alsa driver for a Hitachi SH4 based board with an AC'97 codec (AD1881).
ALSA driver - Ver. 0.9.1
Linux kernel - Ver. 2.4.18
All the modules are getting loadedand AC'97 read/write call backs are working fine.
But I'm facing following problems:
Problem 1: Segmentation Fault while reading the AC97 proc entries.
/proc/asound/card0 directory contents:
# ls -l /proc/asound/card0 -r--r--r-- 1 root root 0 Jun 7 16:10 Aspen18xx -r--r--r-- 1 root root 0 Jun 7 16:10 ac97#0 -r--r--r-- 1 root root 0 Jun 7 16:10 ac97#0regs -r--r--r-- 1 root root 0 Jun 7 16:22 id dr-xr-xr-x 3 root root 0 Jun 7 16:22 pcm0c dr-xr-xr-x 3 root root 0 Jun 7 16:22 pcm0p --------------
Following error comes when I try to read the ac97#0 files:
# cat ac97#0
Unable to handle kernel NULL pointer dereference at virtual address 00000000 pc = 8c11091e *pde = 00000000 Oops: 0000
PC : 8c11091e SP : 8c47dc10 SR : 40000100 TEA :c0100034 Not tainted
R0 : 00000002 R1 : 00000000 R2 : 0000007e R3 :c014c685
R4 : 0000000a R5 : ffffffff R6 : c014c684 R7 :
ffffffff
R8 : 8cd75df4 R9 : 8c47dc60 R10 : 00000000 R11 :
ffffffff
R12 : 00000002 R13 : 8c47de5f R14 : 8c47dc60
MACH: 000004bf MACL: 00000000 GBR : ff800000 PR :c01022be
-------------------
# cat Aspen18xx
Fault in unaligned fixup: 0000
-------------------
Similar types of errors are coming while reading other proc files (in this dir) too. I think the error happens
during the snd_iprintf function calls in ac97_codec.c file, but don't know how to resolve it. Has anybody face this problem?
Any ideas to resolve it?
Problem 2:
I have cross compiled the alsa utilities for my target (SH4 based). While executing (in super user mode) 'alsamixer', it terminates with following error message:
ALSA lib control.c:612:<snd_ctl_open_noupdate> Invalid CTL default
alsamixer: function snd_ctl_open failed for default:
In mailing list, I could see many queries on this error, but couldn't find any proper solution for this. The snddevices script was run before this, which creates the relevant device under /dev
Could you please give some advices to resolve these issues?
Thanks a lot,
Prince.
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
At Wed, 25 Jun 2003 07:38:26 -0700 (PDT),
Quoted 60 lines · Prince John
Hi,
I'm working on an Alsa driver for a Hitachi SH4 based board with an AC'97 codec (AD1881).
ALSA driver - Ver. 0.9.1
Linux kernel - Ver. 2.4.18All the modules are getting loadedand AC'97 read/write call backs are working fine.
But I'm facing following problems:Problem 1: Segmentation Fault while reading the AC97 proc entries.
/proc/asound/card0directory contents:# ls -l /proc/asound/card0 -r--r--r-- 1 root root 0 Jun 7 16:10 Aspen18xx -r--r--r-- 1 root root 0 Jun 7 16:10 ac97#0 -r--r--r-- 1 root root 0 Jun 7 16:10 ac97#0regs -r--r--r-- 1 root root 0 Jun 7 16:22 id dr-xr-xr-x 3 root root 0 Jun 7 16:22 pcm0c dr-xr-xr-x 3 root root 0 Jun 7 16:22 pcm0p --------------Following error comes when I try to read the ac97#0 files:
# cat ac97#0Unable to handle kernel NULL pointer dereference at virtual address 00000000 pc = 8c11091e *pde = 00000000 Oops: 0000PC :
8c11091eSP :8c47dc10SR : 40000100 TEA :c0100034Not tainted
R0 : 00000002 R1 : 00000000 R2 :0000007eR3 :c014c685
R4 :0000000aR5 : ffffffff R6 :c014c684R7 :
ffffffff
R8 :8cd75df4R9 :8c47dc60R10 : 00000000 R11 :
ffffffff
R12 : 00000002 R13 :8c47de5fR14 :8c47dc60
MACH:000004bfMACL: 00000000 GBR :ff800000PR :c01022be
-------------------# cat Aspen18xxFault in unaligned fixup: 0000
-------------------
Quoted 7 lines
Similar types of errors are coming while reading other proc files (in this dir) too. I think the error happens
during thesnd_iprintffunction calls inac97_codec.cfile, but don't know how to resolve it. Has anybody face this problem?
Any ideas to resolve it?
this kind of problem has appeared when different gcc versions were used for the kernel and the ALSA modules. not sure whether it's your case. the problem #2 also seems like the behavior happening with the gcc-mismatch above.
can SH4 trace oops via ksymoops?
Takashi
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
Quoted 12 lines
Has anybody face this problem?
Quoted 1 line
Any ideas to resolve it?
this kind of problem has appeared when different gcc versions were
used for the kernel and the ALSA modules. not sure whether it's your
case. the problem #2 also seems like the behavior happening with the
gcc-mismatch above.
Quoted 1 line
Takashi
-------------
Hi Takashi,
Thank you verymuch for your response.
I'm using sh4-linux-gcc ver 3.0.4 for both Kernel and ALSA driver, lib and utils. I'm using ALSA driver - Ver. 0.9.1. Will it help if I change to the latest version?
Quoted 1 line
can SH4 trace oops via ksymoops?
Sorry, I didn't get it. Could u please clarify it?
Thanks,
Prince
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
At Tue, 1 Jul 2003 06:00:35 -0700 (PDT),
Quoted 13 lines · Prince John
Quoted 13 lines
Has anybody face this problem?
Quoted 1 line
Any ideas to resolve it?
this kind of problem has appeared when different gcc versions were
used for the kernel and the ALSA modules. not sure whether it's your
case. the problem #2 also seems like the behavior happening with the
gcc-mismatch above.
Quoted 8 lines
Quoted 1 line
Takashi
-------------
Hi Takashi,
Thank you verymuch for your response.
I'm using sh4-linux-gcc ver 3.0.4 for both Kernel and ALSA driver, lib and utils. I'm using ALSA driver - Ver. 0.9.1. Will it help if I change to the latest version?
hmm, so that's not the case.
about upgrading, yes, it's better to use the latest version. it will also make it easier to integrate your code into our tree.
Quoted 3 lines
Quoted 1 line
can SH4 trace oops via ksymoops?
Sorry, I didn't get it. Could u please clarify it?
on intel (and many other) architectures, we can trace the stack printed to the kernel message via ksymoops program when a kernel oops happens. i have no idea about SH4 development environment, but if you have such one, this will help greatly to spot the buggy point out.
Takashi
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01