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 <[email protected]> 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: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to