Support SMUX in clockgen software PLL updates

This commit is contained in:
Daniel Pieczko
2024-05-02 16:30:00 +01:00
parent 8c4043fd4c
commit a9762e048a
2 changed files with 10 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ UNRELEASED
----------
* FIXED: Device fails to enumerate when ADAT and S/PDIF transmit are enabled
* FIXED: Update software PLL at the correct rate for ADAT SMUX
* CHANGED: Enable only the minimum number of ADAT input formats based for the
supported sample frequencies

View File

@@ -723,7 +723,14 @@ void clockGen ( streaming chanend ?c_spdif_rx,
}
}
}
if(adatChannel == 4 || adatChannel == 8)
/* An edge needs to be recorded/toggled in the following cases:
* smux = 0: adatChannel = 4, 8
* smux = 1: adatChannel = 2, 4, 6, 8
* smux = 2: adatChannel = 1, 2, 3, 4, 5, 6, 7, 8
* This is simplified to a shift-and-mask in the if-condition below.
*/
if ((adatChannel != 0) && ((adatChannel << smux) & 3) == 0)
{
adatCounters.samples += 1;
@@ -764,7 +771,7 @@ void clockGen ( streaming chanend ?c_spdif_rx,
adatChannel = 0;
}
break;
#endif
#endif // XUA_ADAT_RX_EN
#if (XUA_SPDIF_RX_EN || XUA_ADAT_RX_EN)
/* AudioHub requests data */