summaryrefslogtreecommitdiffstats
path: root/sound/soc/dwc/designware_i2s.c
diff options
context:
space:
mode:
authorJose Abreu <Jose.Abreu@synopsys.com>2016-12-27 14:00:53 +0000
committerMark Brown <broonie@kernel.org>2017-01-09 11:59:05 +0000
commite2f748e06db389d9fd51413df23ff8d3615a47db (patch)
treec98393f5af52c9c060e23452c3ea4fd1b25abdcd /sound/soc/dwc/designware_i2s.c
parent6fce983f9b3ef51d47e647b2cff15049ef803781 (diff)
downloadop-kernel-dev-e2f748e06db389d9fd51413df23ff8d3615a47db.zip
op-kernel-dev-e2f748e06db389d9fd51413df23ff8d3615a47db.tar.gz
ASoC: dwc: Add record capability in PIO mode
Up until now PIO mode offered only playback support. With this patch we add support for record mode. The PCM was refactored so that we could reuse the existing infrastructure without many changes. We have support for 16 and 32 bits of sample size using only 2 channels. Tested in a x86_64 platform and in ARC AXS101 SDP platform. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/dwc/designware_i2s.c')
-rw-r--r--sound/soc/dwc/designware_i2s.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c
index bdf8398..9c46e41 100644
--- a/sound/soc/dwc/designware_i2s.c
+++ b/sound/soc/dwc/designware_i2s.c
@@ -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) {
OpenPOWER on IntegriCloud