diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2016-12-27 14:00:53 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-01-09 11:59:05 +0000 |
commit | e2f748e06db389d9fd51413df23ff8d3615a47db (patch) | |
tree | c98393f5af52c9c060e23452c3ea4fd1b25abdcd /sound/soc/dwc/local.h | |
parent | 6fce983f9b3ef51d47e647b2cff15049ef803781 (diff) |
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/local.h')
-rw-r--r-- | sound/soc/dwc/local.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/dwc/local.h b/sound/soc/dwc/local.h index 68afd7577343..91dc70a826f8 100644 --- a/sound/soc/dwc/local.h +++ b/sound/soc/dwc/local.h @@ -105,20 +105,27 @@ struct dw_i2s_dev { struct i2s_clk_config_data config; int (*i2s_clk_cfg)(struct i2s_clk_config_data *config); - /* data related to PIO transfers (TX) */ + /* data related to PIO transfers */ bool use_pio; struct snd_pcm_substream __rcu *tx_substream; + struct snd_pcm_substream __rcu *rx_substream; unsigned int (*tx_fn)(struct dw_i2s_dev *dev, struct snd_pcm_runtime *runtime, unsigned int tx_ptr, bool *period_elapsed); + unsigned int (*rx_fn)(struct dw_i2s_dev *dev, + struct snd_pcm_runtime *runtime, unsigned int rx_ptr, + bool *period_elapsed); unsigned int tx_ptr; + unsigned int rx_ptr; }; #if IS_ENABLED(CONFIG_SND_DESIGNWARE_PCM) void dw_pcm_push_tx(struct dw_i2s_dev *dev); +void dw_pcm_pop_rx(struct dw_i2s_dev *dev); int dw_pcm_register(struct platform_device *pdev); #else void dw_pcm_push_tx(struct dw_i2s_dev *dev) { } +void dw_pcm_pop_rx(struct dw_i2s_dev *dev) { } int dw_pcm_register(struct platform_device *pdev) { return -EINVAL; |