mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-22 07:39:35 +02:00
Moved mixer initialization to caed(8).
This commit is contained in:
parent
4220a2c9d4
commit
c58c284784
@ -18064,3 +18064,5 @@
|
||||
* Optimized RDAudioPort SQL queries.
|
||||
2018-11-26 Patrick Linstruth <patrick@deltecent.com>
|
||||
* Fixed bug where requested port could overrun HPI_MAX_NODES.
|
||||
2018-11-26 Patrick Linstruth <patrick@deltecent.com>
|
||||
* Moved mixer initialization to caed(8).
|
||||
|
33
cae/cae.cpp
33
cae/cae.cpp
@ -47,6 +47,7 @@
|
||||
#include <rdcmd_switch.h>
|
||||
#include <rdsvc.h>
|
||||
#include <rdsystem.h>
|
||||
#include <rdaudio_port.h>
|
||||
|
||||
#include <cae_socket.h>
|
||||
#include <cae.h>
|
||||
@ -106,6 +107,8 @@ MainObject::MainObject(QObject *parent,const char *name)
|
||||
rd_config->load();
|
||||
rd_config->setModuleName("caed");
|
||||
|
||||
rd_config->log("caed",RDConfig::LogInfo,"cae starting");
|
||||
|
||||
//
|
||||
// Initialize Data Structures
|
||||
//
|
||||
@ -589,12 +592,23 @@ void MainObject::InitProvisioning() const
|
||||
void MainObject::InitMixers()
|
||||
{
|
||||
for(int i=0;i<RD_MAX_CARDS;i++) {
|
||||
RDAudioPort *port=new RDAudioPort(rd_config->stationName(),i);
|
||||
switch(cae_driver[i]) {
|
||||
case RDStation::Hpi:
|
||||
hpiSetClockSource(i,port->clockSource());
|
||||
for(int j=0;j<RD_MAX_PORTS;j++) {
|
||||
for(int k=0;k<RD_MAX_PORTS;k++) {
|
||||
hpiSetPassthroughLevel(i,j,k,RD_MUTE_DEPTH);
|
||||
}
|
||||
if(port->inputPortType(j)==RDAudioPort::Analog) {
|
||||
hpiSetInputType(i,j,RDCae::Analog);
|
||||
}
|
||||
else {
|
||||
hpiSetInputType(i,j,RDCae::AesEbu);
|
||||
}
|
||||
hpiSetInputLevel(i,j,RD_BASE_ANALOG+port->inputPortLevel(j));
|
||||
hpiSetOutputLevel(i,j,RD_BASE_ANALOG+port->outputPortLevel(j));
|
||||
hpiSetInputMode(i,j,port->inputPortMode(j));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -603,6 +617,15 @@ void MainObject::InitMixers()
|
||||
for(int k=0;k<RD_MAX_PORTS;k++) {
|
||||
jackSetPassthroughLevel(i,j,k,RD_MUTE_DEPTH);
|
||||
}
|
||||
if(port->inputPortType(j)==RDAudioPort::Analog) {
|
||||
jackSetInputType(i,j,RDCae::Analog);
|
||||
}
|
||||
else {
|
||||
jackSetInputType(i,j,RDCae::AesEbu);
|
||||
}
|
||||
jackSetInputLevel(i,j,RD_BASE_ANALOG+port->inputPortLevel(j));
|
||||
jackSetOutputLevel(i,j,RD_BASE_ANALOG+port->outputPortLevel(j));
|
||||
jackSetInputMode(i,j,port->inputPortMode(j));
|
||||
}
|
||||
break;
|
||||
|
||||
@ -611,12 +634,22 @@ void MainObject::InitMixers()
|
||||
for(int k=0;k<RD_MAX_PORTS;k++) {
|
||||
alsaSetPassthroughLevel(i,j,k,RD_MUTE_DEPTH);
|
||||
}
|
||||
if(port->inputPortType(j)==RDAudioPort::Analog) {
|
||||
alsaSetInputType(i,j,RDCae::Analog);
|
||||
}
|
||||
else {
|
||||
alsaSetInputType(i,j,RDCae::AesEbu);
|
||||
}
|
||||
alsaSetInputLevel(i,j,RD_BASE_ANALOG+port->inputPortLevel(j));
|
||||
alsaSetOutputLevel(i,j,RD_BASE_ANALOG+port->outputPortLevel(j));
|
||||
alsaSetInputMode(i,j,port->inputPortMode(j));
|
||||
}
|
||||
break;
|
||||
|
||||
case RDStation::None:
|
||||
break;
|
||||
}
|
||||
delete port;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,6 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
// Set Audio Assignments
|
||||
//
|
||||
air_segue_length=rda->airplayConf()->segueLength()+1;
|
||||
RDSetMixerPorts(rda->config()->stationName(),rda->cae());
|
||||
|
||||
//
|
||||
// RIPC Connection
|
||||
|
@ -233,11 +233,6 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
this,SLOT(playStoppedData(int)));
|
||||
rda->cae()->connectHost();
|
||||
|
||||
//
|
||||
// Set Audio Assignments
|
||||
//
|
||||
RDSetMixerPorts(rda->station()->name(),rda->cae());
|
||||
|
||||
//
|
||||
// Deck Monitors
|
||||
//
|
||||
|
@ -332,7 +332,6 @@ MainObject::MainObject(QObject *parent)
|
||||
//
|
||||
// Sound Initialization
|
||||
//
|
||||
RDSetMixerPorts(rda->config()->stationName(),rda->cae());
|
||||
sql=QString("select ")+
|
||||
"CHANNEL,"+ // 00
|
||||
"CARD_NUMBER,"+ // 01
|
||||
|
@ -191,11 +191,6 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
this,SLOT(caeConnectedData(bool)));
|
||||
rda->cae()->connectHost();
|
||||
|
||||
//
|
||||
// Load Audio Assignments
|
||||
//
|
||||
RDSetMixerPorts(rda->config()->stationName(),rda->cae());
|
||||
|
||||
//
|
||||
// Filter
|
||||
//
|
||||
|
@ -147,11 +147,6 @@ MainWidget::MainWidget(QWidget *parent)
|
||||
log_greenball_map=new QPixmap(greenball_xpm);
|
||||
log_redball_map=new QPixmap(redball_xpm);
|
||||
|
||||
//
|
||||
// Load Audio Assignments
|
||||
//
|
||||
RDSetMixerPorts(rda->config()->stationName(),rda->cae());
|
||||
|
||||
//
|
||||
// Log Filter
|
||||
//
|
||||
|
@ -90,7 +90,6 @@ MainObject::MainObject(QObject *parent)
|
||||
// Set Audio Assignments
|
||||
//
|
||||
// air_segue_length=rda->airplayConf()->segueLength()+1;
|
||||
RDSetMixerPorts(rda->config()->stationName(),rda->cae());
|
||||
|
||||
//
|
||||
// RIPC Connection
|
||||
|
Loading…
x
Reference in New Issue
Block a user