1. 28 3月, 2012 16 次提交
    • Stefan Knoblich's avatar
      ftmod_misdn: More reworking of b-channel audio tx handling. · a856d81a
      Stefan Knoblich 提交于
      Use the amount of audio data received in misdn_read() to determine how many
      bytes we need to send to the b-channel (= how much free space is left
      in the b-channel tx queue). (This is how libosmo-abis and LCR handle it too.)
      
      A pipe is used as a poll()-able audio tx buffer (filled in misdn_write()):
      FTDM_WRITE wait requests are currently poll()-ed on the input side of the pipe,
      whereas FTDM_READ and _EVENT requests are poll()-ed on the b-channel socket itself.
      
      For every N-bytes of audio data read from the b-channel in misdn_read(),
      we try to get as much out of the tx pipe, convert it into the ISDN_P_B_RAW
      format and send it to the b-channel socket.
      
      If there's less than N-bytes left in the pipe, we fill the remaining buffer
      with silence to avoid buffer underflows.
      
      B-Channel handling overview:
      
        - misdn_wait(FTDM_WRITE) on audio pipe
      
        - misdn_write() put audio data into pipe
      
        - misdn_wait(FTDM_READ) for next incoming mISDN
          message on b-channel socket
      
        - misdn_read() handle mISDN event, for PH_DATA_IND:
      
            - Write data into channel buffer and convert
              to a/u-law using misdn_convert_audio_bits()
      
            - Try to fetch N-bytes from audio pipe
      
            - If not enough bytes in pipe: fill remaining space with silence
      
            - Convert audio to raw format
      
            - Send to b-channel (PH_DATA_REQ)
      
      Known problems / bugs / further investigation:
      
         1. Bridge aborted by "Write Buffer 0 bytes Failed!" error from switch_core_io.c.
            This is "fixed" by _not_ setting the b-channel sockfd to non-blocking mode.
      
         2. Audio glitches (maybe caused by FTDM_WRITE misdn_wait() handling or blocking I/O on sockfd?)
      
         3. misdn_read() EBUSY error messages from sending data to b-channel sockfd after enabling channel.
      Signed-off-by: 's avatarStefan Knoblich <stkn@openisdn.net>
      a856d81a
    • Anthony Minessale's avatar
      FS-4049 alt patch 5 · d5e7e849
      Anthony Minessale 提交于
      d5e7e849
    • Anthony Minessale's avatar
      FS-4049 alt patch 4 · c4c46eec
      Anthony Minessale 提交于
      c4c46eec
    • Anthony Minessale's avatar
      FS-4049 alt patch 3 · c909ed6c
      Anthony Minessale 提交于
      c909ed6c
    • Anthony Minessale's avatar
      FS-4049 alt patch 2 · 1932f852
      Anthony Minessale 提交于
      1932f852
    • Anthony Minessale's avatar
      FS-4049 alt patch · cf47982e
      Anthony Minessale 提交于
      cf47982e
    • Anthony Minessale's avatar
      FS-4049 revert · 973a39e0
      Anthony Minessale 提交于
      973a39e0
    • Anthony Minessale's avatar
      FS-4050 --resolve · 09bb0bab
      Anthony Minessale 提交于
      09bb0bab
    • Anthony Minessale's avatar
      FS-4049 · 80b18bb2
      Anthony Minessale 提交于
      80b18bb2
    • Anthony Minessale's avatar
      FS-4049 try this · fb1d45b4
      Anthony Minessale 提交于
      fb1d45b4
    • Anthony Minessale's avatar
      FS-4025 --resolve · ce75bf5a
      Anthony Minessale 提交于
      ce75bf5a
    • Anthony Minessale's avatar
      FS-4016 --resolve · 2baed0ab
      Anthony Minessale 提交于
      2baed0ab
    • Anthony Minessale's avatar
      revert 19d3e646 · 185f08ca
      Anthony Minessale 提交于
      185f08ca
    • Steve Underwood's avatar
      Various updates to spandsp tests · 7b9e4ff6
      Steve Underwood 提交于
      spandsp logging now passes an opaque pointer to the logging routine, to
      increase flexibility. Right now the pointer is set to NULL in all calls.
      7b9e4ff6
    • Steve Underwood's avatar
      Tweak spandsp tests · c1203b58
      Steve Underwood 提交于
      c1203b58
    • Steve Underwood's avatar
      3e2bea0f
  2. 27 3月, 2012 11 次提交
  3. 26 3月, 2012 5 次提交
  4. 24 3月, 2012 8 次提交