Revert "i2s: Add functionality for a loopback sanity test"

This reverts commit 822f23f438199b9a67fb5b92c9cd94cd7306c28a.

Writes to the Control register that zero the SLPBK bit stop any tx+rx
threads as a side-effect. Since this happens as a side effect of writing
the Control register TX or RX bits tx and rx no longer work.

Change-Id: I570023934d746591f1bb30a77027223a64416994
diff --git a/shodan_infrastructure/MatchaI2S.cs b/shodan_infrastructure/MatchaI2S.cs
index 918ca12..33cf190 100644
--- a/shodan_infrastructure/MatchaI2S.cs
+++ b/shodan_infrastructure/MatchaI2S.cs
@@ -219,13 +219,6 @@
             txThread.Start();
         }
 
-        private void StartLoopback()
-        {
-            this.Log(LogLevel.Info, "Starting loopback.");
-            loopbackThread = machine.ObtainManagedThread(LoopbackFrame, SampleFrequencyHz);
-            loopbackThread.Start();
-        }
-
         private void StopThread(ref IManagedThread thread)
         {
             thread?.Stop();
@@ -289,14 +282,6 @@
             }
         }
 
-        private void LoopbackFrame()
-        {
-            if ((rxBuffer.Count >= 0) && (txBuffer.Count <= 1)) {
-                ulong sample = rxBuffer.Read();
-                txBuffer.Write(sample);
-            }
-        }
-
         private void CreateRegisters()
         {
             Registers.IrqState.Define(this)
@@ -346,18 +331,7 @@
                             StopThread(ref rxThread);
                         }
                     })
-                .WithFlag(2, out loopbackEnable, name: "SLPBK",
-                    writeCallback: (_, val) => {
-                        if (val) {
-                            StartRx();
-                            StartTx();
-                            StartLoopback();
-                        } else {
-                            StopThread(ref rxThread);
-                            StopThread(ref txThread);
-                            StopThread(ref loopbackThread);
-                        }
-                    })
+                .WithFlag(2, out loopbackEnable, name: "SLPBK")
                 .WithReservedBits(3, 15)
                 .WithValueField(18, 6, out rxClkDivide, name: "NCO_RX")
                 .WithValueField(25, 6, out txClkDivide, name: "NCO_TX");
@@ -460,7 +434,6 @@
 
         private IManagedThread rxThread;
         private IManagedThread txThread;
-        private IManagedThread loopbackThread;
         private PCMDecoder decoder;
         private PCMEncoder encoder;