Hi,Misa
1.
I have wm8987 driver for my board,my kernel  version is 2.6.24.7
supplied by the board vendor ,and I have porting the android driver to
it,before porting the alsa ,I can run eclair well ,wifi ,phone module
etc can work well.
and here are my .config file in the kernel root dir
1313 # System on Chip audio support
1314 #
1315 CONFIG_SND_SOC=y
1316 CONFIG_SND_S3C_SOC=y
1317
1318 #
1319 # SoC Audio for the Samsung S3C
1320 #
1321 CONFIG_SND_S3C6410_SOC_I2S_V32=y
1322 # CONFIG_SND_S3C64XX_SOC_SMDK6410_WM9713 is not set
1323 # CONFIG_SND_S3C6410_SOC_AC97 is not set
1324 # CONFIG_SND_S3C6410_SOC_SMDK6410_WM8580 is not set
1325 CONFIG_SND_S3C64XX_SOC_SMDK6410_WM8987=y
1326 CONFIG_AUDIO_CODEC_PROCFS=y
1327 # CONFIG_SND_S3C64XX_SOC_SMDK6410_WM8990 is not set
1328 CONFIG_SND_SOC_WM8987=y
1329
1330 #
1331 # Open Sound System
1332 #
1333 # CONFIG_SOUND_PRIME is not set
1334 CONFIG_HID_SUPPORT=y
1335 CONFIG_HID=y
1336 CONFIG_HID_DEBUG=y
1337 CONFIG_HIDRAW=y

And here are the kernel bootup info:
Advanced Linux Sound Architecture Driver Version 1.0.15 (Tue Nov 20
19:16:42 2007 UTC).
ASoC version 0.13.1
WM8987: Audio Codec Driver v0.12
asoc: WM8987 <-> s3c-i2s mapping ok
Proc-FS interface for audio codec
ALSA device list:
  #0: smdk6400 (WM8987)


2.   open("/dev/snd/pcmC0D0p", O_RDWR|O_NONBLOCK|O_ASYNC|O_LARGEFILE)
= 11
I don't agree with you ,11 is not the error No.The open() function
return the file description of the file it opened,if it failed to
open ,it will return -1.

3.  Also you didn't mention adding sound symlinks in init.rc
Just now I have add the symlink in init.rc .But the problem remain.

Thank you~
--Weber

On 7月28日, 下午1时36分, Misael Lopez <mesa...@gmail.com> wrote:
> Hi Weber,
>
> >> > I now want to porting alsa to eclair.My board are smdk6410,the audio
> >> > module are  wm8987.
>
> Do you have ALSA drivers for your board? I see it's a s3c6410 based
> board, but I don't see any ASoC machine driver for s3c6410+wm8987 in
> android kernel tree (at least 2.6.29).
>
> > 1399 mmap2(NULL, 4096, PROT_READ, MAP_SHARED, 11, 0x80000) = -1
> > ENXIO(No such device or address)
> > The first address is NULL,why?
>
> I think that in your case, the original problem is in the open call
> itself (error code 11):
>    open("/dev/snd/pcmC0D0p", O_RDWR|O_NONBLOCK|O_ASYNC|O_LARGEFILE) = 11
>
> >> > 3.make and add sth to init.rc
> >> > # for alsa sound
>
> Also you didn't mention adding sound symlinks in init.rc. Do you have
> them already?
>
> symlink /dev/snd/pcmC0D0c /dev/pcmC0D0c
> symlink /dev/snd/pcmC0D0p /dev/pcmC0D0p
> symlink /dev/snd/controlC0 /dev/controlC0
> symlink /dev/snd/timer /dev/timer
>
> Thanks,
> -Misa
>
> On Tue, Jul 27, 2010 at 8:52 PM, Weber <qvbs...@gmail.com> wrote:
> > Hi,
> > Could you give me some clue?
>
> > look at the strace log:
> > 1399 mmap2(NULL, 4096, PROT_READ, MAP_SHARED, 11, 0x80000) = -1
> > ENXIO(No such device or address)
> > The first address is NULL,why?
> > Is this the error from the mediaserver src or  alsa src or they are
> > not compatible in eclair?
>
> > Thank you
> > --Weber
> > On 7月27日, 上午9时04分, Weber <qvbs...@gmail.com> wrote:
> >> Hi,
> >> I still have a question :If alsa are not added to the system ,are
> >> there other solutions to make the system generate sound ?Is alsa the
> >> only way?
> >> Thanks
> >> --Weber
>
> >> On Jul 26, 10:53 pm, Weber <qvbs...@gmail.com> wrote:
>
> >> > Hi,everyone
> >> > I now want to porting alsa to eclair.My board are smdk6410,the audio
> >> > module are  wm8987.
> >> > these are my steps:
> >> > 1.download the snapshot  of eclair version from android.git.kernel.org/
> >> > platform/external
> >> > and then tar them to external/
> >> > 2.
> >> > build/target/board/.../BoardConfig.mk
>
> >> > #HAVE_HTC_AUDIO_DRIVER := true
> >> > BOARD_USES_GENERIC_AUDIO :=false
> >> > BOARD_USES_ALSA_AUDIO := true
> >> > BUILD_WITH_ALSA_UTILS := true
>
> >> > 3.make and add sth to init.rc
> >> > # for alsa sound
> >> >      chown audio audio  /dev/snd/controlC0
> >> >      chown audio audio  /dev/snd/pcmC0D0c
> >> >      chown audio audio  /dev/snd/pcmC0D0p
> >> >      chown audio audio  /dev/snd/timer
> >> >      chown audio audio  /dev/snd/audio
> >> >      chown audio audio  /dev/snd/dsp
> >> >      chown audio audio  /dev/snd/mixer
> >> >      chown audio audio  /dev/snd/seq
> >> >      chown audio audio  /dev/snd/
> >> >      chmod 0666  /dev/snd/controlC0
> >> >      chmod 0666  /dev/snd/pcmC0D0c
> >> >      chmod 0666  /dev/snd/pcmC0D0p
> >> >      chmod 0666  /dev/snd/timer
> >> >      chmod 0666  /dev/snd/audio
> >> >      chmod 0666  /dev/snd/dsp
> >> >      chmod 0666  /dev/snd/mixer
> >> >      chmod 0666  /dev/snd/seq
>
> >> > 4.add asound.conf to system/etc/asound.conf
>
> >> > then I boot the system ,but the system can't bootup now!(before
> >> > porting the alsa,it can bootup)
> >> > I can see the log from the std output:
> >> > # init: untracked pid 901 exited
> >> > # init: untracked pid 991 exited
> >> > # init: untracked pid 1079 exited
> >> > and I  found that the print pids are the pids of /system/bin/
> >> > mediaserver
> >> > and here are the logcat related alsa:(no error )
> >> >   330 D/AudioHardwareALSA(  687): openOutputStream called for devices:
> >> > 0x00000002
> >> >  331 D/ALSAModule(  687): open called for devices 00000002 in mode
> >> > 0...
> >> >  574 I/ALSAModule(  687): Initialized ALSA PLAYBACK device
> >> > AndroidPlayback_Speaker_normal
> >> >  615 I/AudioFlinger(  687): AudioFlinger's thread 0x32520 ready to run
> >> >  616 D/ALSAModule(  687): route called for devices 00000002 in mode
> >> > 0...
> >> > 3949 D/AudioHardwareALSA(  816): openOutputStream called for devices:
> >> > 0x00000002
> >> > 3950 D/ALSAModule(  816): open called for devices 00000002 in mode
> >> > 0...
>
> >> > If I comment the mediaserver in init.rc ,the system still can not boot
> >> > up
> >> > the logcat are:
> >> > 4011 I/ServiceManager(  704): Waiting for sevice media.audio_policy...
> >> > 4012 I/ServiceManager(  704): Waiting for sevice media.audio_policy...
> >> > 4013 W/AudioSystem(  704): AudioPolicyService not published,
> >> > waiting...
> >> > 4014 I/ServiceManager(  704): Waiting for sevice media.audio_policy...
> >> > 4015 I/ServiceManager(  704): Waiting for sevice media.audio_policy...
>
> >> > then I try to start it manually and use strace to log it
> >> > strace  -o /mediaserver-log mediaserver
> >> > and the failure-cause-maybe  in /mediaserver-log   are:
> >> > 1393 open("/dev/snd/pcmC0D0p", O_RDWR|O_NONBLOCK|O_ASYNC|O_LARGEFILE)
> >> > = 11
> >> > 1394 close(10)                               = 0
> >> > 1395 ioctl(11, AGPIOC_ACQUIRE or APM_IOC_STANDBY, 0xbeb646e0) = 0
> >> > 1396 fcntl64(11, F_GETFL)                    = 0x22802 (flags O_RDWR|
> >> > O_NONBLOCK|O_ASYNC|O_LARGEFILE)
> >> > 1397 ioctl(11, AGPIOC_INFO, 0xbeb646dc)      = 0
> >> > 1398 ioctl(11, AGPIOC_RELEASE or APM_IOC_SUSPEND, 0xbeb646d4) = 0
> >> > 1399 mmap2(NULL, 4096, PROT_READ, MAP_SHARED, 11, 0x80000) = -1 ENXIO
> >> > (No such device or address)
>
> >> > It seem that mmap2() are the cause .but I don't know what to do now
>
> >> > also ,when run strace  -o /mediaserver-log mediaserver
> >> > the std output are:
> >> > ptrace: umoven: I/O error
> >> > ptrace: umoven: I/O error
> >> > ptrace: umoven: I/O error
> >> > ptrace: umoven: I/O error
> >> > ptrace: umoven: I/O error
> >> > ptrace: umoven: I/O error
> >> > ....
> >> >  So could you help me?
> >> > Thanks
> >> > --Weber
>
> > --
> > unsubscribe: android-porting+unsubscr...@googlegroups.com
> > website:http://groups.google.com/group/android-porting

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to