AttCS3310 Relacs Plugins
0.9.8
|
#include <cs3310dio.h>
Public Member Functions | |
CS3310DIO (DigitalIO *dio) | |
CS3310DIO (void) | |
virtual | ~CS3310DIO (void) |
virtual int | open (DigitalIO &dio) |
virtual int | open (Device &device) override |
virtual bool | isOpen (void) const |
virtual void | close (void) |
virtual const Options & | settings (void) const |
virtual int | lines (void) const |
virtual double | minLevel (void) const |
virtual double | maxLevel (void) const |
virtual void | levels (vector< double > &l) const |
virtual int | attenuate (int di, double &decibel) |
virtual int | testAttenuate (int di, double &decibel) |
int | setZeroCrossing (bool enable=true) |
int | setMute (bool mute=true) |
int | calibrate (void) |
Public Member Functions inherited from Attenuator | |
Attenuator (void) | |
Attenuator (const string &deviceclass) | |
virtual | ~Attenuator (void) |
virtual int | mute (int di) |
virtual int | testMute (int di) |
virtual int | open (const string &device) |
Protected Member Functions | |
virtual void | initOptions () override |
Protected Member Functions inherited from Attenuator | |
void | setInfo (void) |
Additional Inherited Members | |
Static Public Attributes inherited from Attenuator | |
static const double | MuteAttenuationLevel |
static const int | Underflow |
static const int | Overflow |
[Attenuator] Control the cs3310 attenuator via a DigitalIO device
First, the CS-signal has to be set low to adress the chip. Then, the data are presented at the DATAOUT-pin, and are strobed via the STROBE-Signal into the chip. Repeat this for all the bits we want to transfer. After this, we wait a little before we reset the CS-signal back to high. The MUTE-signal mutes the chip (.. who would have guessed...?), but without changing the set attenuation. Additionally, if you leave MUTE\ low for more than 2 ms, the CS 3310 recalibrates itself. The ZCEN-signal means zero crossing detection enable, and does exactly this. If it is set, the chip waits for the next zero crossing of the signal before changing to the new attenuation. This reduces clicking (for you HiFi-proffesionals out there...), and is a really elegant feature. If there are no zero crossing, the setting changes are forced after 18 ms.
References CS3310DIO::open().
CS3310DIO | ( | void | ) |
References CS3310DIO::initOptions().
|
virtual |
|
virtual |
References DigitalIO::allocateLine(), DigitalIO::freeLines(), DigitalIO::isOpen(), and CS3310DIO::isOpen().
Referenced by CS3310DIO::CS3310DIO(), and CS3310DIO::open().
|
overridevirtual |
Reimplemented from Attenuator.
References CS3310DIO::open().
|
virtual |
Implements Attenuator.
References DigitalIO::isOpen().
Referenced by CS3310DIO::attenuate(), CS3310DIO::calibrate(), CS3310DIO::close(), CS3310DIO::open(), CS3310DIO::setMute(), CS3310DIO::setZeroCrossing(), and CS3310DIO::testAttenuate().
|
virtual |
Implements Attenuator.
References DigitalIO::freeLines(), CS3310DIO::isOpen(), and DigitalIO::write().
|
virtual |
Returns the current settings of the attenuator.
|
virtual |
Returns the number of output lines the attenuator device supports.
Implements Attenuator.
|
virtual |
Returns the minimum possible attenuation level in decibel. This number can be negative, indicating amplification.
Implements Attenuator.
|
virtual |
Returns the maximum possible attenuation level in decibel.
Implements Attenuator.
|
virtual |
Returns in l all possible attenuation levels sorted by increasing attenuation levels (highest last).
Implements Attenuator.
|
virtual |
Implements Attenuator.
References CS3310DIO::isOpen(), Attenuator::MuteAttenuationLevel, Attenuator::Overflow, and Attenuator::Underflow.
|
virtual |
Implements Attenuator.
References CS3310DIO::isOpen(), Attenuator::MuteAttenuationLevel, Attenuator::Overflow, and Attenuator::Underflow.
int setZeroCrossing | ( | bool | enable = true | ) |
References CS3310DIO::isOpen(), and DigitalIO::write().
int setMute | ( | bool | mute = true | ) |
References CS3310DIO::isOpen(), and DigitalIO::write().
int calibrate | ( | void | ) |
References CS3310DIO::isOpen(), and DigitalIO::write().
|
overrideprotectedvirtual |
Referenced by CS3310DIO::CS3310DIO().