Beispiel #1
0
// This function handles the rate change request from the driver.
// If the rate mode has changed it will create a new DAL.
static HRESULT myAppChangeSR(DICE_DRIVER_CB_DATA * pData)
{
	HRESULT hResult = NO_ERROR;
	uint32 notify = 0;
	DAL_RATE_MODE_ENUM driverRateMode;

	driverRateMode = dalRateByID(pData->rate)->rateMode;
	if (driverRateMode != lastDriverRatemode)
	{
		//Driver asked for a change of rate mode
		lastDriverRatemode = driverRateMode;
	    myAppCreateDAL(driverRateMode);
	    // Send the RX and TX Configuration Notification as this might
	    // have resulted in a change of the Rx and Tx streams going
	    // to the computer. This will for example happen if the device
	    // has ADAT, when going from 48k to 96k ADAT will be reduced
	    // to 4 channels (SMUXII)
		notify |= DD_NOTIFY_RX_CFG_CHG_BIT  | DD_NOTIFY_TX_CFG_CHG_BIT;
	}

	//Change the Clock as instructed by driver, this could be a change
	//in clock source, nominal rate or both.
	dalSetClockSource (eDAL_INTERFACE_1, pData->source, pData->rate);
	
	//Send the Clock Setting Accept Notification, this should always be send
	notify |= DD_NOTIFY_CLOCK_ACP;
	diceDriverNotifyHost(notify);
	return hResult;
}
Beispiel #2
0
static HRESULT myAppChangeSR(DICE_DRIVER_CB_DATA * pData)
{
	HRESULT hResult = NO_ERROR;
	uint32 notify = 0;

	if (dalRateByID (pData->rate)->rateMode != lastDriverRateMode)
	{
		lastDriverRateMode = dalRateByID (pData->rate)->rateMode;
		
		dalCreateInterface(eDAL_INTERFACE_1, lastDriverRateMode, INPUT_DEVICES,OUTPUT_DEVICES);
		eapDriverChangeRateMode (lastDriverRateMode);
	    dalStartInterface(eDAL_INTERFACE_1);
		//Send the RX and TX Configuration Notification
		notify |= DD_NOTIFY_RX_CFG_CHG_BIT  | DD_NOTIFY_TX_CFG_CHG_BIT;
	}
	//Change the Clock Now
	dalSetClockSource (eDAL_INTERFACE_1, pData->source, pData->rate);
	//Send the Clock Setting Accept Notification
	notify |= DD_NOTIFY_CLOCK_ACP;
	diceDriverNotifyHost(notify);
	return hResult;
}