diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2016-12-27 17:00:53 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-01-09 14:59:05 +0300 |
commit | e2f748e06db389d9fd51413df23ff8d3615a47db (patch) | |
tree | c98393f5af52c9c060e23452c3ea4fd1b25abdcd /sound/soc/dwc/designware_i2s.c | |
parent | 6fce983f9b3ef51d47e647b2cff15049ef803781 (diff) | |
download | linux-e2f748e06db389d9fd51413df23ff8d3615a47db.tar.xz |
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.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c index bdf8398cbc81..9c46e4112026 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) { |