Changeset 1533

Show
Ignore:
Timestamp:
03/30/09 15:48:16 (15 years ago)
Author:
jwoithe
Message:

RME: more low-level infrastructure

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/doc/rme_notes/rme_config_register_map.txt

    r1532 r1533  
    191191 
    192192For the FF400, the buffer is written in 32-quadlet (128-byte) sub-blocks via 
    193 a bounce buffer.  If the final sub-block is not 32-quadlets the write is only 
    194 as big as the sub-block (that is, no padding takes place).  The sub-block 
    195 data to be written is sent to register 0x80100290.  The 2-quadlet register 
    196 at 0x80100288 is set with the flash address to write the block to and th
    197 size (in bytes) of the data block.  Finally, a 0x1 is written to CBA+(8*4) 
    198 to initiate the write.  Polling for "device not busy" should commence after 
    199 a wait of 2 ms. 
     193a bounce buffer.  If the final sub-block is not 32-quadlets the write is 
     194only as big as the sub-block (that is, no padding takes place).  The 
     195sub-block data to be written is sent to the block starting at 0x80100290.  
     196The 2-quadlet register at 0x80100288 is set with the flash address to writ
     197the block to and the size (in bytes) of the data block.  Finally, a 0x1 is 
     198written to CBA+(8*4) to initiate the write.  Polling for "device not busy" 
     199should commence after a wait of 2 ms. 
    200200 
    201201 
     
    207207 
    208208On the FF400, erasure is controlled by writing a special magic number to 
    209 the the flash erase control register (CBA+8*4): 
     209the the flash control register (CBA+8*4): 
    210210  Erase volume: write 0xe 
    211211  Erase settings: write 0xd 
  • trunk/libffado/src/rme/rme_avdevice.cpp

    r1532 r1533  
    11/* 
    2  * Copyright (C) 2005-2008 by Jonathan Woithe 
     2 * Copyright (C) 2005-2009 by Jonathan Woithe 
    33 * Copyright (C) 2005-2008 by Pieter Palmers 
    44 * 
     
    2626 
    2727#include "rme/rme_avdevice.h" 
     28#include "rme/fireface_def.h" 
    2829 
    2930#include "libieee1394/configrom.h" 
     
    4344 
    4445namespace Rme { 
     46 
     47// Template for a RmeDevice object method which intelligently returns a 
     48// register or value applicable to the connected model and warns if something 
     49// isn't quite right. 
     50#define MODEL_SELECTOR(_name,_ff400_arg,_ff800_arg) \ 
     51unsigned long long int \ 
     52RmeDevice::_name() { \ 
     53    switch (m_rme_model) { \ 
     54        case RME_MODEL_FIREFACE400: return _ff400_arg; \ 
     55        case RME_MODEL_FIREFACE800: return _ff800_arg; \ 
     56    default: \ 
     57      debugOutput( DEBUG_LEVEL_WARNING, "Bad RME model %d\n", m_rme_model ); \ 
     58  } \ 
     59  return 0xffffffffffffffffLL; \ 
     60} 
    4561 
    4662// to define the supported devices 
     
    6783 
    6884} 
     85 
     86MODEL_SELECTOR(cmd_buffer_addr, RME_FF400_CMD_BUFFER, RME_FF800_CMD_BUFFER) 
     87MODEL_SELECTOR(stream_start_reg, RME_FF400_STREAM_START_REG, RME_FF800_STREAM_START_REG) 
     88MODEL_SELECTOR(stream_end_reg, RME_FF400_STREAM_END_REG, RME_FF800_STREAM_END_REG) 
     89MODEL_SELECTOR(flash_settings_addr, RME_FF400_FLASH_SETTINGS_ADDR, RME_FF800_FLASH_SETTINGS_ADDR) 
     90MODEL_SELECTOR(flash_mixer_vol_addr, RME_FF400_FLASH_MIXER_VOLUME_ADDR, RME_FF800_FLASH_MIXER_VOLUME_ADDR) 
     91MODEL_SELECTOR(flash_mixer_pan_addr, RME_FF400_FLASH_MIXER_PAN_ADDR, RME_FF800_FLASH_MIXER_PAN_ADDR) 
     92MODEL_SELECTOR(flash_mixer_hw_addr, RME_FF400_FLASH_MIXER_HW_ADDR, RME_FF800_FLASH_MIXER_HW_ADDR) 
    6993 
    7094bool 
  • trunk/libffado/src/rme/rme_avdevice.h

    r1532 r1533  
    100100 
    101101    signed int m_ddsFreq; 
     102 
     103private: 
     104    unsigned long long int cmd_buffer_addr(); 
     105    unsigned long long int stream_start_reg(); 
     106    unsigned long long int stream_end_reg(); 
     107    unsigned long long int flash_settings_addr(); 
     108    unsigned long long int flash_mixer_vol_addr(); 
     109    unsigned long long int flash_mixer_pan_addr(); 
     110    unsigned long long int flash_mixer_hw_addr(); 
    102111}; 
    103112