You only must write register 18. This is the info
7- Reroute SPDIF input line to pin Data5 which is also connected to D1 (Not needed for BII)
Register 18 (0x12): Spdif Input line
|0|0|0|0|0|0|0|1| SDPIF Input: Data1 (D) (In BuffII, spdif is connected to this pin)
|0|0|0|0|0|0|1|0| SDPIF Input: Data2
|0|0|0|0|0|1|0|0| SDPIF Input: Data3
|0|0|0|0|1|0|0|0| SDPIF Input: Data4
|0|0|0|1|0|0|0|0| SDPIF Input: Data5 (In BuffII, spdif is also connected to this pin)
|0|0|1|0|0|0|0|0| SDPIF Input: Data6
|0|1|0|0|0|0|0|0| SDPIF Input: Data7
|1|0|0|0|0|0|0|0| SDPIF Input: Data8
For write register, add one of those line to select input.
writeSabreReg(0x12,0x01); // Write value into reg 18 Input: Data1
writeSabreReg(0x12,0x02); // Write value into reg 18 Input: Data2
writeSabreReg(0x12,0x04); // Write value into reg 18 Input: Data3
writeSabreReg(0x12,0x08); // Write value into reg 18 Input: Data4
Add selected line at input selection (lines 1036 to 1057 Hifiduino code b10b1)
Original version.
void setAndPrintInput(byte value){
setAndPrintInputFormat(settings[input][FORMATVAL]%FORMATCHO); // Setup input format value
setAndPrintFirFilter(settings[input][FIRVAL]%FIRCHO); // Setup FIR filter value
setAndPrintIirFilter(settings[input][IIRVAL]%IIRCHO); // Setup IIR filter value
setAndPrintDPLL(settings[input][DPLLVAL]%DPLLCHO); // Setup the DPLL value
setAndPrintQuantizer(settings[input][QUANVAL]%QUANCHO); // Setup quantizer value
setAndPrintNotch(settings[input][NOTCHVAL]%NOTCHCHO); // Setup notch delay value
setAndPrintDPLLMode(settings[input][PLMVAL]%PLMCHO); // Setup dpll mode value
lcd.setCursor(1,0);
//lcd.print("IN");
//lcd.write(0xA5);
switch (value){
case 0:
lcd.print(no0);
break;
case 1:
lcd.print(no1);
break;
case 2:
lcd.print(no2);
break;
case 3:
lcd.print(no3);
break;
case 4:
lcd.print(no4);
break;
case 5:
lcd.print(no5);
break;
Modified version
void setAndPrintInput(byte value){
setAndPrintInputFormat(settings[input][FORMATVAL]%FORMATCHO); // Setup input format value
setAndPrintFirFilter(settings[input][FIRVAL]%FIRCHO); // Setup FIR filter value
setAndPrintIirFilter(settings[input][IIRVAL]%IIRCHO); // Setup IIR filter value
setAndPrintDPLL(settings[input][DPLLVAL]%DPLLCHO); // Setup the DPLL value
setAndPrintQuantizer(settings[input][QUANVAL]%QUANCHO); // Setup quantizer value
setAndPrintNotch(settings[input][NOTCHVAL]%NOTCHCHO); // Setup notch delay value
setAndPrintDPLLMode(settings[input][PLMVAL]%PLMCHO); // Setup dpll mode value
lcd.setCursor(1,0);
//lcd.print("IN");
//lcd.write(0xA5);
switch (value){
case 0:
lcd.print(no0);
writeSabreReg(0x12,0x01); // Write value into reg 18 Input: Data1
break;
case 1:
lcd.print(no1);
writeSabreReg(0x12,0x02); // Write value into reg 18 Input: Data2
break;
case 2:
lcd.print(no2);
writeSabreReg(0x12,0x04); // Write value into reg 18 Input: Data3
break;
case 3:
lcd.print(no3);
writeSabreReg(0x12,0x08); // Write value into reg 18 Input: Data4
break;
case 4:
lcd.print(no4);
break;
case 5:
lcd.print(no5);
break;
Regards
Edited by user Thursday, August 9, 2012 5:40:21 PM(UTC)
| Reason: Not specified