Changeset 3229:bbf20dac188c in roaraudio


Ignore:
Timestamp:
01/24/10 11:19:14 (10 years ago)
Author:
phi
Branch:
default
Message:

added some really _bad_ debugging code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroaross/libroaross.c

    r3184 r3229  
    494494#endif 
    495495  default: 
     496    ROAR_DBG("_ioctl_stream_format(*): unsupported format"); 
    496497    errno = ENOSYS; 
    497498    return -1; 
     
    825826 audio_buf_info * bi; 
    826827 count_info     * ci; 
     828#ifdef __FIXME__ 
     829 char * nosys_reqname = NULL; 
     830#endif 
    827831#ifdef va_argp 
    828832 va_list args; 
     
    844848  ip = argp; 
    845849//  ROAR_DBG("ioctl(__fd=%i, __request=%lu): ip=%p", __fd, (long unsigned int) __request, ip); 
     850#ifdef __FIXME__ 
     851  switch ((handle = pointer->handle)->type) { 
     852   case SOUND_PCM_READ_RATE: nosys_reqname = "SOUND_PCM_READ_RATE"; break; 
     853   case SOUND_PCM_READ_CHANNELS: nosys_reqname = "SOUND_PCM_READ_CHANNELS"; break; 
     854   case SOUND_PCM_READ_BITS: nosys_reqname = "SOUND_PCM_READ_BITS"; break; 
     855   case SOUND_PCM_READ_FILTER: nosys_reqname = "SOUND_PCM_READ_FILTER"; break; 
     856   case SNDCTL_COPR_RESET: nosys_reqname = "SNDCTL_COPR_RESET"; break; 
     857   case SNDCTL_COPR_LOAD: nosys_reqname = "SNDCTL_COPR_LOAD"; break; 
     858   case SNDCTL_COPR_HALT: nosys_reqname = "SNDCTL_COPR_HALT"; break; 
     859   case SNDCTL_COPR_RDATA: nosys_reqname = "SNDCTL_COPR_RDATA"; break; 
     860   case SNDCTL_COPR_RCODE: nosys_reqname = "SNDCTL_COPR_RCODE"; break; 
     861   case SNDCTL_COPR_WDATA: nosys_reqname = "SNDCTL_COPR_WDATA"; break; 
     862   case SNDCTL_COPR_WCODE: nosys_reqname = "SNDCTL_COPR_WCODE"; break; 
     863   case SNDCTL_COPR_RUN: nosys_reqname = "SNDCTL_COPR_RUN"; break; 
     864   case SNDCTL_COPR_SENDMSG: nosys_reqname = "SNDCTL_COPR_SENDMSG"; break; 
     865   case SNDCTL_COPR_RCVMSG: nosys_reqname = "SNDCTL_COPR_RCVMSG"; break; 
     866   case SNDCTL_DSP_SPEED: nosys_reqname = "SNDCTL_DSP_SPEED"; break; 
     867/* 
     868   case : nosys_reqname = ""; break; 
     869   case : nosys_reqname = ""; break; 
     870   case : nosys_reqname = ""; break; 
     871*/ 
     872  } 
     873#endif 
    846874  switch ((handle = pointer->handle)->type) { 
    847875   case HT_STREAM: 
     
    854882      case SNDCTL_DSP_SPEED: 
    855883        handle->stream.info.rate = *ip; 
     884        ROAR_DBG("ioctl(__fd=%i, __request=%lu): rate=%i", __fd, (long unsigned int) __request, *ip); 
    856885        return 0; 
    857886       break; 
    858887      case SNDCTL_DSP_CHANNELS: 
    859888        handle->stream.info.channels = *ip; 
     889        ROAR_DBG("ioctl(__fd=%i, __request=%lu): channels=%i", __fd, (long unsigned int) __request, *ip); 
    860890        return 0; 
    861891       break; 
     
    869899       break; 
    870900      case SNDCTL_DSP_SETFMT: 
     901        ROAR_DBG("ioctl(__fd=%i, __request=%lu): fmt=0x%x", __fd, (long unsigned int) __request, *ip); 
    871902        return _ioctl_stream_format(handle, *ip); 
    872903       break; 
     
    913944#endif 
    914945      default: 
     946#ifdef __FIXME__ 
     947        ROAR_DBG("ioctl(__fd=%i, __request=%lu (%s)) = -1 // errno = ENOSYS", __fd, (long unsigned int) __request, nosys_reqname); 
     948#else 
    915949        ROAR_DBG("ioctl(__fd=%i, __request=%lu) = -1 // errno = ENOSYS", __fd, (long unsigned int) __request); 
     950#endif 
    916951        errno = ENOSYS; 
    917952        return -1; 
Note: See TracChangeset for help on using the changeset viewer.