linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Linphone-developers] About on voice on S3C2410


From: cheng zhu
Subject: RE: [Linphone-developers] About on voice on S3C2410
Date: Sun, 16 Aug 2009 23:11:38 +0800

Hello,

I find oss_thread may block in read(), in oss_oepn():

       ... ...
        fd=open(devname,O_RDWR|O_NONBLOCK);
        if (fd<0) return -EWOULDBLOCK;
        /* unset nonblocking mode */
        /* We wanted non blocking open but now put it back to normal ; thanks Xine !*/
        fcntl(fd, F_SETFL, fcntl(fd, F_GETFL)&~O_NONBLOCK);                                      // I don't know why to set block mode???
       ... ...
        /* start recording !!! Alex */
        {
                int fl,res;

                fl=PCM_ENABLE_OUTPUT|PCM_ENABLE_INPUT;
                res=ioctl(fd, SNDCTL_DSP_SETTRIGGER, &fl);                                          // I don't know why to start recording???
                if (res<0) ms_warning("OSS_TRIGGER: %s",strerror(errno));
        }
       ... ...
I don't know why to set block mode and why to start recording.

Because s3c2410-uda1341 driver don't support SNDCTL_DSP_SETTRIGGER, so oss_thread will block in read():

        ... ...
        while(d->read_started || d->write_started){
                if (d->pcmfd>=0){
                        if (d->read_started){
                                  ... ...
                        } else {
                                int sz = read(d->pcmfd,rtmpbuff,bsize);
                                if( sz!=bsize) ms_warning("sound device read returned %i !",sz);
                        }
       ... ...

I think audio driver can't support SNDCTL_DSP_SETTRIGGER isn't serious, If we have some method to support this audio device?

Thank you for your suggestion.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]