2023-08-29 Fred Gleason <fredg@paravelsystems.com>

* Removed support for the 'Set Input Volume' ['IV'] CAE command.
	* Removed support for the 'Set Input Level' ['IL'] CAE command.
	* Removed support for the 'Set Output Level' ['OL'] CAE command.
	* Removed support for the 'Set Input Mode' ['IM'] CAE command.
	* Removed support for the 'Set Output Mode' ['OM'] CAE command.
	* Removed support for the 'Set Input Vox Level' ['IX'] CAE command.
	* Removed support for the 'Set Input Type' ['IT'] CAE command.
	* Removed support for the 'Set Clock Source' ['CS'] CAE command.
	* Removed the 'RDCae::setClockSource()' method.
	* Removed the 'RDCae::setInputVolume()' method.
	* Removed the 'RDCae::setInputLevel()' method.
	* Removed the 'RDCae::setOutputLevel()' method.
	* Removed the 'RDCae::setInputMode()' method.
	* Removed the 'RDCae::setOutputMode()' method.
	* Removed the 'RDCae::setInputVOXLevel()' method.
	* Removed the 'RDCae::setInputType()' method.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason 2023-08-29 17:39:19 -04:00
parent 2723339e73
commit ac45e60949
8 changed files with 66 additions and 183 deletions

View File

@ -24386,3 +24386,20 @@
2023-08-29 Fred Gleason <fredg@paravelsystems.com>
* Refactored the playback, record and mixer commands in the CAE
protocol design document.
2023-08-29 Fred Gleason <fredg@paravelsystems.com>
* Removed support for the 'Set Input Volume' ['IV'] CAE command.
* Removed support for the 'Set Input Level' ['IL'] CAE command.
* Removed support for the 'Set Output Level' ['OL'] CAE command.
* Removed support for the 'Set Input Mode' ['IM'] CAE command.
* Removed support for the 'Set Output Mode' ['OM'] CAE command.
* Removed support for the 'Set Input Vox Level' ['IX'] CAE command.
* Removed support for the 'Set Input Type' ['IT'] CAE command.
* Removed support for the 'Set Clock Source' ['CS'] CAE command.
* Removed the 'RDCae::setClockSource()' method.
* Removed the 'RDCae::setInputVolume()' method.
* Removed the 'RDCae::setInputLevel()' method.
* Removed the 'RDCae::setOutputLevel()' method.
* Removed the 'RDCae::setInputMode()' method.
* Removed the 'RDCae::setOutputMode()' method.
* Removed the 'RDCae::setInputVOXLevel()' method.
* Removed the 'RDCae::setInputType()' method.

View File

@ -207,6 +207,8 @@ MainObject::MainObject(QObject *parent)
SIGNAL(setAudioPassthroughLevelReq(int,unsigned,unsigned,unsigned,int)),
this,
SLOT(setAudioPassthroughLevelData(int,unsigned,unsigned,unsigned,int)));
connect(cae_server,SIGNAL(updateAudioPorts(int)),
this,SLOT(updateAudioPortsData(int)));
connect(cae_server,SIGNAL(setClockSourceReq(int,unsigned,int)),
this,SLOT(setClockSourceData(int,unsigned,int)));
connect(cae_server,
@ -969,6 +971,31 @@ void MainObject::setAudioPassthroughLevelData(int id,unsigned card,
}
void MainObject::updateAudioPortsData(int id)
{
for(int i=0;i<RD_MAX_CARDS;i++) {
RDAudioPort *port=new RDAudioPort(rda->config()->stationName(),i);
Driver *dvr=GetDriver(i);
if(dvr!=NULL) {
dvr->setClockSource(i,port->clockSource());
for(int j=0;j<RD_MAX_PORTS;j++) {
if(port->inputPortType(j)==RDAudioPort::Analog) {
dvr->setInputType(i,j,RDCae::Analog);
}
else {
dvr->setInputType(i,j,RDCae::AesEbu);
}
dvr->setInputLevel(i,j,RD_BASE_ANALOG+port->inputPortLevel(j));
dvr->setOutputLevel(i,j,RD_BASE_ANALOG+port->outputPortLevel(j));
dvr->setInputMode(i,j,port->inputPortMode(j));
}
}
delete port;
}
}
void MainObject::setClockSourceData(int id,unsigned card,int input)
{
if((card<0)||(input<0)) {
@ -1229,28 +1256,17 @@ void MainObject::InitProvisioning() const
void MainObject::InitMixers()
{
for(int i=0;i<RD_MAX_CARDS;i++) {
RDAudioPort *port=new RDAudioPort(rda->config()->stationName(),i);
Driver *dvr=GetDriver(i);
Driver *dvr=NULL;
updateAudioPortsData(-1);
for(int i=0;i<RD_MAX_CARDS;i++) {
if(dvr!=NULL) {
dvr->setClockSource(i,port->clockSource());
for(int j=0;j<RD_MAX_PORTS;j++) {
for(int k=0;k<RD_MAX_PORTS;k++) {
dvr->setPassthroughLevel(i,j,k,RD_MUTE_DEPTH);
}
if(port->inputPortType(j)==RDAudioPort::Analog) {
dvr->setInputType(i,j,RDCae::Analog);
}
else {
dvr->setInputType(i,j,RDCae::AesEbu);
}
dvr->setInputLevel(i,j,RD_BASE_ANALOG+port->inputPortLevel(j));
dvr->setOutputLevel(i,j,RD_BASE_ANALOG+port->outputPortLevel(j));
dvr->setInputMode(i,j,port->inputPortMode(j));
}
}
delete port;
}
}

View File

@ -100,6 +100,7 @@ class MainObject : public QObject
void getInputStatusData(int id,unsigned card,unsigned port);
void setAudioPassthroughLevelData(int id,unsigned card,unsigned input,
unsigned output,int level);
void updateAudioPortsData(int id);
void setClockSourceData(int id,unsigned card,int input);
void setOutputStatusFlagData(int id,unsigned card,unsigned port,
unsigned stream,bool state);

View File

@ -398,21 +398,6 @@ bool CaeServer::ProcessCommand(int id,const QString &cmd)
}
}
}
if((f0.at(0)=="IV")&&(f0.size()==4)) { // Set Input Volume
unsigned card=f0.at(1).toUInt(&ok);
if(ok&&(card<RD_MAX_CARDS)) {
unsigned stream=f0.at(2).toUInt(&ok);
if(ok&&(stream<RD_MAX_STREAMS)) {
if(ok) {
int level=f0.at(3).toInt(&ok);
if(ok) {
emit setInputVolumeReq(id,card,stream,level);
was_processed=true;
}
}
}
}
}
if((f0.at(0)=="OP")&&(f0.size()==5)) { // Set Output Port
unsigned card=f0.at(1).toUInt(&ok);
if(ok&&(card<RD_MAX_CARDS)) {
@ -470,84 +455,6 @@ bool CaeServer::ProcessCommand(int id,const QString &cmd)
}
}
}
if((f0.at(0)=="IL")&&(f0.size()==4)) { // Set Input Level
unsigned card=f0.at(1).toUInt(&ok);
if(ok&&(card<RD_MAX_CARDS)) {
unsigned port=f0.at(2).toUInt(&ok);
if(ok&&(port<RD_MAX_PORTS)) {
int level=f0.at(3).toInt(&ok);
if(ok) {
emit setInputLevelReq(id,card,port,level);
was_processed=true;
}
}
}
}
if((f0.at(0)=="OL")&&(f0.size()==4)) { // Set Output Level
unsigned card=f0.at(1).toUInt(&ok);
if(ok&&(card<RD_MAX_CARDS)) {
unsigned port=f0.at(2).toUInt(&ok);
if(ok&&(port<RD_MAX_PORTS)) {
int level=f0.at(3).toInt(&ok);
if(ok) {
emit setOutputLevelReq(id,card,port,level);
was_processed=true;
}
}
}
}
if((f0.at(0)=="IM")&&(f0.size()==4)) { // Set Input Mode
unsigned card=f0.at(1).toUInt(&ok);
if(ok&&(card<RD_MAX_CARDS)) {
unsigned port=f0.at(2).toUInt(&ok);
if(ok&&(port<RD_MAX_PORTS)) {
unsigned mode=f0.at(3).toUInt(&ok);
if(ok&&(mode<=3)) {
emit setInputModeReq(id,card,port,mode);
was_processed=true;
}
}
}
}
if((f0.at(0)=="OM")&&(f0.size()==4)) { // Set Output Mode
unsigned card=f0.at(1).toUInt(&ok);
if(ok&&(card<RD_MAX_CARDS)) {
unsigned port=f0.at(2).toUInt(&ok);
if(ok&&(port<RD_MAX_PORTS)) {
unsigned mode=f0.at(3).toUInt(&ok);
if(ok&&(mode<=3)) {
emit setOutputModeReq(id,card,port,mode);
was_processed=true;
}
}
}
}
if((f0.at(0)=="IX")&&(f0.size()==4)) { // Set Input Vox Level
unsigned card=f0.at(1).toUInt(&ok);
if(ok&&(card<RD_MAX_CARDS)) {
unsigned stream=f0.at(2).toUInt(&ok);
if(ok&&(stream<RD_MAX_STREAMS)) {
int level=f0.at(3).toInt(&ok);
if(ok) {
emit setInputVoxLevelReq(id,card,stream,level);
was_processed=true;
}
}
}
}
if((f0.at(0)=="IT")&&(f0.size()==4)) { // Set Input Type
unsigned card=f0.at(1).toUInt(&ok);
if(ok&&(card<RD_MAX_CARDS)) {
unsigned port=f0.at(2).toUInt(&ok);
if(ok&&(port<RD_MAX_PORTS)) {
int type=f0.at(3).toInt(&ok);
if(ok&&(type<=1)) {
emit setInputTypeReq(id,card,port,type);
was_processed=true;
}
}
}
}
if((f0.at(0)=="IS")&&(f0.size()==3)) { // Get Input Status
unsigned card=f0.at(1).toUInt(&ok);
if(ok&&(card<RD_MAX_CARDS)) {
@ -574,15 +481,8 @@ bool CaeServer::ProcessCommand(int id,const QString &cmd)
}
}
}
if((f0.at(0)=="CS")&&(f0.size()==3)) { // Set Clock Source
unsigned card=f0.at(1).toUInt(&ok);
if(ok&&(card<RD_MAX_CARDS)) {
unsigned input=f0.at(2).toUInt(&ok);
if(ok&&(input<RD_MAX_PORTS)) {
emit setClockSourceReq(id,card,input);
was_processed=true;
}
}
if((f0.at(0)=="AP")&&(f0.size()==1)) { // Update Audio Ports
emit updateAudioPortsReq(id);
}
if((f0.at(0)=="OS")&&(f0.size()==5)) { // Set Output Status Flag
unsigned card=f0.at(1).toUInt(&ok);
@ -597,7 +497,6 @@ bool CaeServer::ProcessCommand(int id,const QString &cmd)
}
}
}
if(f0.at(0)=="ME") { // Meter Enable
if(f0.size()>2) { // So we don't warn if no cards are specified
uint16_t udp_port=0xFFFF&f0.at(1).toUInt(&ok);

View File

@ -68,7 +68,8 @@ class CaeServer : public QObject
void loadPlaybackReq(int id,unsigned card,const QString &name);
void unloadPlaybackReq(int id,unsigned handle);
void playPositionReq(int id,unsigned handle,unsigned pos);
void playReq(int id,unsigned handle,unsigned length,unsigned speed,unsigned pitch_flag);
void playReq(int id,unsigned handle,unsigned length,unsigned speed,
unsigned pitch_flag);
void stopPlaybackReq(int id,unsigned handle);
void timescalingSupportReq(int id,unsigned card);
void loadRecordingReq(int id,unsigned card,unsigned port,unsigned coding,
@ -78,23 +79,16 @@ class CaeServer : public QObject
void recordReq(int id,unsigned card,unsigned stream,unsigned len,
int threshold_level);
void stopRecordingReq(int id,unsigned card,unsigned stream);
void setInputVolumeReq(int id,unsigned card,unsigned stream,int level);
void setOutputPortReq(int id,unsigned card,unsigned stream,unsigned port,
int level);
int level);
void setOutputVolumeReq(int id,unsigned card,unsigned stream,int port,
int level);
void fadeOutputVolumeReq(int id,unsigned card,unsigned stream,unsigned port,
int level,unsigned length);
void setInputLevelReq(int id,unsigned card,unsigned port,int level);
void setOutputLevelReq(int id,unsigned card,unsigned port,int level);
void setInputModeReq(int id,unsigned card,unsigned stream,unsigned mode);
void setOutputModeReq(int id,unsigned card,unsigned stream,unsigned mode);
void setInputVoxLevelReq(int id,unsigned card,unsigned stream,int level);
void setInputTypeReq(int id,unsigned card,unsigned port,unsigned type);
void getInputStatusReq(int id,unsigned card,unsigned port);
void setAudioPassthroughLevelReq(int id,unsigned card,unsigned input,
unsigned output,int level);
void setClockSourceReq(int id,unsigned card,int input);
void updateAudioPortsReq(int id);
void setOutputStatusFlagReq(int id,unsigned card,unsigned port,
unsigned stream,bool state);
void openRtpCaptureChannelReq(int id,unsigned card,unsigned port,uint16_t udp_port,

View File

@ -1171,6 +1171,18 @@
</varlistentry>
</variablelist>
</sect3>
<sect3 xml:id="sect.mixer_operations.commands.update_audio_ports">
<title><command>Update Audio Ports</command></title>
<para>
Update all audio ports to match current database settings.
</para>
<para>
<userinput>
AP
</userinput>
</para>
</sect3>
</sect2>
<sect2 xml:id="sect.mixer_operations.responses">

View File

@ -282,18 +282,6 @@ void RDCae::stopRecord(int card,int stream)
}
void RDCae::setClockSource(int card,RDCae::ClockSource src)
{
SendCommand(QString::asprintf("CS %d %d!",card,src));
}
void RDCae::setInputVolume(int card,int stream,int level)
{
SendCommand(QString::asprintf("IV %d %d %d!",card,stream,level));
}
void RDCae::setOutputVolume(int card,int stream,int port,int level)
{
SendCommand(QString::asprintf("OV %d %d %d %d!",card,stream,port,level));
@ -313,42 +301,6 @@ void RDCae::fadeOutputVolume(int card,int stream,int port,int level,int length)
}
void RDCae::setInputLevel(int card,int port,int level)
{
SendCommand(QString::asprintf("IL %d %d %d!",card,port,level));
}
void RDCae::setOutputLevel(int card,int port,int level)
{
SendCommand(QString::asprintf("OL %d %d %d!",card,port,level));
}
void RDCae::setInputMode(int card,int stream,RDCae::ChannelMode mode)
{
SendCommand(QString::asprintf("IM %d %d %d!",card,stream,mode));
}
void RDCae::setOutputMode(int card,int stream,RDCae::ChannelMode mode)
{
SendCommand(QString::asprintf("OM %d %d %d!",card,stream,mode));
}
void RDCae::setInputVOXLevel(int card,int stream,int level)
{
SendCommand(QString::asprintf("IX %d %d %d!",card,stream,level));
}
void RDCae::setInputType(int card,int port,RDCae::SourceType type)
{
SendCommand(QString::asprintf("IT %d %d %d!",card,port,type));
}
void RDCae::setPassthroughVolume(int card,int in_port,int out_port,int level)
{
SendCommand(QString().

View File

@ -52,17 +52,9 @@ class RDCae : public QObject
void unloadRecord(int card,int stream);
void record(int card,int stream,unsigned length,int threshold);
void stopRecord(int card,int stream);
void setClockSource(int card,RDCae::ClockSource src);
void setInputVolume(int card,int stream,int level);
void setOutputVolume(int card,int stream,int port,int level);
void setOutputPort(int card,int stream,int port);
void fadeOutputVolume(int card,int stream,int port,int level,int length);
void setInputLevel(int card,int port,int level);
void setOutputLevel(int card,int port,int level);
void setInputMode(int card,int stream,RDCae::ChannelMode mode);
void setOutputMode(int card,int stream,RDCae::ChannelMode mode);
void setInputVOXLevel(int card,int stream,int level);
void setInputType(int card,int port,RDCae::SourceType type);
void setPassthroughVolume(int card,int in_port,int out_port,int level);
bool inputStatus(int card,int port) const;
void inputMeterUpdate(int card,int port,short levels[2]);