Lines Matching +full:audio +full:- +full:tx
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * pxa2xx-i2s.c -- ALSA Soc Audio Layer
21 #include <sound/pxa2xx-lib.h>
24 #include <linux/platform_data/asoc-pxa.h>
26 #include "pxa2xx-i2s.h"
32 #define SACR1 (0x0004) /* Serial Audio I 2 S/MSB-Justified Control Register */
33 #define SASR0 (0x000C) /* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
34 #define SAIMR (0x0014) /* Serial Audio Interrupt Mask Register */
35 #define SAICR (0x0018) /* Serial Audio Interrupt Clear Register */
36 #define SADIV (0x0060) /* Audio Clock Divider Register. */
37 #define SADR (0x0080) /* Serial Audio Data Register (TX and RX FIFO access Register). */
40 #define SACR0_TFTH(x) ((x) << 8) /* Tx FIFO Interrupt or DMA Trigger Threshold */
53 #define SASR0_TUR (1 << 5) /* Tx FIFO Underrun */
55 #define SASR0_TFS (1 << 3) /* Tx FIFO Service Request */
58 #define SASR0_TNF (1 << 0) /* Tx FIFO Not Empty */
61 #define SAICR_TUR (1 << 5) /* Clear Tx FIFO Underrun Interrupt */
64 #define SAIMR_TUR (1 << 5) /* Enable Tx FIFO Underrun Condition Interrupt */
66 #define SAIMR_TFS (1 << 3) /* Enable Tx FIFO Service Interrupt */
83 .chan_name = "tx",
149 return -ENODEV; in pxa2xx_i2s_set_dai_sysclk()
161 return -EINVAL; in pxa2xx_i2s_hw_params()
166 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in pxa2xx_i2s_hw_params()
182 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in pxa2xx_i2s_hw_params()
221 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in pxa2xx_i2s_trigger()
234 ret = -EINVAL; in pxa2xx_i2s_trigger()
243 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { in pxa2xx_i2s_shutdown()
297 clk_i2s = clk_get(dai->dev, "I2SCLK"); in pxa2xx_i2s_probe()
323 clk_i2s = ERR_PTR(-ENOENT); in pxa2xx_i2s_remove()
358 .name = "pxa-i2s",
379 pxa2xx_i2s_pcm_stereo_out.addr = res->start + SADR; in pxa2xx_i2s_drv_probe()
380 pxa2xx_i2s_pcm_stereo_in.addr = res->start + SADR; in pxa2xx_i2s_drv_probe()
382 return devm_snd_soc_register_component(&pdev->dev, &pxa_i2s_component, in pxa2xx_i2s_drv_probe()
390 .name = "pxa2xx-i2s",
396 clk_i2s = ERR_PTR(-ENOENT); in pxa2xx_i2s_init()
412 MODULE_ALIAS("platform:pxa2xx-i2s");