[BACK]Return to dev.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / sndiod

Diff for /src/usr.bin/sndiod/dev.c between version 1.81 and 1.82

version 1.81, 2021/01/28 11:10:00 version 1.82, 2021/01/28 11:15:31
Line 1972 
Line 1972 
         case SLOT_START:          case SLOT_START:
         case SLOT_READY:          case SLOT_READY:
         case SLOT_RUN:          case SLOT_RUN:
                 slot_stop(s);  
                 /* PASSTHROUGH */  
         case SLOT_STOP:          case SLOT_STOP:
                   slot_stop(s, 0);
                 break;                  break;
         }          }
         dev_unref(s->dev);          dev_unref(s->dev);
Line 2195 
Line 2194 
  * stop & detach if no data to drain.   * stop & detach if no data to drain.
  */   */
 void  void
 slot_stop(struct slot *s)  slot_stop(struct slot *s, int drain)
 {  {
 #ifdef DEBUG  #ifdef DEBUG
         if (log_level >= 3) {          if (log_level >= 3) {
Line 2214 
Line 2213 
         }          }
   
         if (s->pstate == SLOT_RUN) {          if (s->pstate == SLOT_RUN) {
                 if (s->mode & MODE_PLAY) {                  if ((s->mode & MODE_PLAY) && drain) {
                         /*                          /*
                          * Don't detach, dev_cycle() will do it for us                           * Don't detach, dev_cycle() will do it for us
                          * when the buffer is drained.                           * when the buffer is drained.
Line 2222 
Line 2221 
                         s->pstate = SLOT_STOP;                          s->pstate = SLOT_STOP;
                         return;                          return;
                 }                  }
                   slot_detach(s);
           } else if (s->pstate == SLOT_STOP) {
                 slot_detach(s);                  slot_detach(s);
         } else {          } else {
 #ifdef DEBUG  #ifdef DEBUG

Legend:
Removed from v.1.81  
changed lines
  Added in v.1.82