Changeset fac44e12 in rtems


Ignore:
Timestamp:
Jul 9, 2012, 4:56:40 PM (7 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
545c71a
Parents:
d5549f4a (diff), c5ba8ba (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of ssh://git.rtems.org/data/git/rtems

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/lm32/shared/milkymist_ac97/ac97.c

    rd5549f4a rfac44e12  
    315315{
    316316  unsigned int *val = (unsigned int *)buf;
     317  int mic_boost;
    317318  int codec;
    318319  int left, right;
     
    327328  }
    328329  if (mono) {
    329     right = left = 100-(((codec & 0x1f) + 1)*100)/32;
     330    left = 100-(((codec & 0x1f) + 1)*100)/32;
     331    mic_boost = (codec & (1 << 6)) >> 6;
     332    *val = left | mic_boost << 8;
    330333  } else {
    331334    right = 100-(((codec & 0x1f) + 1)*100)/32;
    332335    left = 100-((((codec & 0x1f00) >> 8) + 1)*100)/32;
    333   }
    334   *val = left | (right << 8);
     336    *val = left | (right << 8);
     337  }
    335338  return RTEMS_SUCCESSFUL;
    336339}
     
    340343{
    341344  unsigned int *val = (unsigned int *)buf;
     345  int mic_boost;
    342346  int left, right;
    343347  int codec;
     
    346350  left = *val & 0xff;
    347351  left = (left*32)/100 - 1;
    348   if(left < 0)
     352  if (left < 0)
    349353    left = 0;
    350354
    351   if (mono)
     355  if (mono) {
     356    mic_boost = *val >> 8;
    352357    right = 31;
    353   else {
     358  } else {
    354359    right = (*val >> 8) & 0xff;
    355360    right = (right*32)/100 - 1;
    356     if(right < 0)
     361    if (right < 0)
    357362      right = 0;
    358363  }
     
    363368  else
    364369    codec = (31-left) | ((31-right) << 8);
     370
     371  if (mono) {
     372    if (mic_boost)
     373      codec |= (1 << 6);
     374    else
     375      codec &= ~(1 << 6);
     376  }
    365377
    366378  if (!write_cr(chan, codec))
  • cpukit/libblock/src/bdbuf.c

    rd5549f4a rfac44e12  
    20402040                                      rtems_blkdev_bnum  block)
    20412041{
    2042   if (dd->read_ahead.trigger == block
     2042  if (bdbuf_cache.read_ahead_task != 0
     2043      && dd->read_ahead.trigger == block
    20432044      && !rtems_bdbuf_is_read_ahead_active (dd))
    20442045  {
     
    20462047    rtems_chain_control *chain = &bdbuf_cache.read_ahead_chain;
    20472048
     2049    if (rtems_chain_is_empty (chain))
     2050    {
     2051      sc = rtems_event_send (bdbuf_cache.read_ahead_task,
     2052                             RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
     2053      if (sc != RTEMS_SUCCESSFUL)
     2054        rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_RA_WAKE_UP);
     2055    }
     2056
    20482057    rtems_chain_append_unprotected (chain, &dd->read_ahead.node);
    2049     sc = rtems_event_send (bdbuf_cache.read_ahead_task,
    2050                            RTEMS_BDBUF_READ_AHEAD_WAKE_UP);
    2051     if (sc != RTEMS_SUCCESSFUL)
    2052       rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_RA_WAKE_UP);
    20532058  }
    20542059}
Note: See TracChangeset for help on using the changeset viewer.