ASoC: dwc: Add record capability in PIO mode
[sfrench/cifs-2.6.git] / sound / soc / dwc / designware_i2s.c
index bdf8398cbc81b68b445f202636e8949db5e5cae5..9c46e411202649a31c5a597cebd4af83e2826ce7 100644 (file)
@@ -121,9 +121,14 @@ static irqreturn_t i2s_irq_handler(int irq, void *dev_id)
                        irq_valid = true;
                }
 
-               /* Data available. Record mode not supported in PIO mode */
-               if (isr[i] & ISR_RXDA)
+               /*
+                * Data available. Retrieve samples from FIFO
+                * NOTE: Only two channels supported
+                */
+               if ((isr[i] & ISR_RXDA) && (i == 0) && dev->use_pio) {
+                       dw_pcm_pop_rx(dev);
                        irq_valid = true;
+               }
 
                /* Error Handling: TX */
                if (isr[i] & ISR_TXFO) {