Lines Matching refs:sport
59 struct sport_device *sport = runtime->private_data; in bf5xx_mmap_copy() local
62 bf5xx_pcm_to_ac97((struct ac97_frame *)sport->tx_dma_buf + in bf5xx_mmap_copy()
63 sport->tx_pos, (__u16 *)runtime->dma_area + sport->tx_pos * in bf5xx_mmap_copy()
65 sport->tx_pos += runtime->period_size; in bf5xx_mmap_copy()
66 if (sport->tx_pos >= runtime->buffer_size) in bf5xx_mmap_copy()
67 sport->tx_pos %= runtime->buffer_size; in bf5xx_mmap_copy()
68 sport->tx_delay_pos = sport->tx_pos; in bf5xx_mmap_copy()
70 bf5xx_ac97_to_pcm((struct ac97_frame *)sport->rx_dma_buf + in bf5xx_mmap_copy()
71 sport->rx_pos, (__u16 *)runtime->dma_area + sport->rx_pos * in bf5xx_mmap_copy()
73 sport->rx_pos += runtime->period_size; in bf5xx_mmap_copy()
74 if (sport->rx_pos >= runtime->buffer_size) in bf5xx_mmap_copy()
75 sport->rx_pos %= runtime->buffer_size; in bf5xx_mmap_copy()
85 struct sport_device *sport = runtime->private_data; in bf5xx_dma_irq() local
88 if (sport->once == 0) { in bf5xx_dma_irq()
91 sport->once = 1; in bf5xx_dma_irq()
133 struct sport_device *sport = runtime->private_data; in bf5xx_pcm_hw_free() local
136 sport->once = 0; in bf5xx_pcm_hw_free()
139 memset(sport->tx_dma_buf, 0, runtime->buffer_size * in bf5xx_pcm_hw_free()
142 memset(sport->rx_dma_buf, 0, runtime->buffer_size * in bf5xx_pcm_hw_free()
152 struct sport_device *sport = runtime->private_data; in bf5xx_pcm_prepare() local
159 sport_set_tx_callback(sport, bf5xx_dma_irq, substream); in bf5xx_pcm_prepare()
160 sport_config_tx_dma(sport, sport->tx_dma_buf, runtime->periods, in bf5xx_pcm_prepare()
163 sport_set_rx_callback(sport, bf5xx_dma_irq, substream); in bf5xx_pcm_prepare()
164 sport_config_rx_dma(sport, sport->rx_dma_buf, runtime->periods, in bf5xx_pcm_prepare()
169 sport_set_tx_callback(sport, bf5xx_dma_irq, substream); in bf5xx_pcm_prepare()
170 sport_config_tx_dma(sport, runtime->dma_area, runtime->periods, in bf5xx_pcm_prepare()
173 sport_set_rx_callback(sport, bf5xx_dma_irq, substream); in bf5xx_pcm_prepare()
174 sport_config_rx_dma(sport, runtime->dma_area, runtime->periods, in bf5xx_pcm_prepare()
184 struct sport_device *sport = runtime->private_data; in bf5xx_pcm_trigger() local
193 sport->tx_delay_pos = 0; in bf5xx_pcm_trigger()
195 sport_tx_start(sport); in bf5xx_pcm_trigger()
197 sport_rx_start(sport); in bf5xx_pcm_trigger()
204 sport->tx_pos = 0; in bf5xx_pcm_trigger()
206 sport_tx_stop(sport); in bf5xx_pcm_trigger()
209 sport->rx_pos = 0; in bf5xx_pcm_trigger()
211 sport_rx_stop(sport); in bf5xx_pcm_trigger()
223 struct sport_device *sport = runtime->private_data; in bf5xx_pcm_pointer() local
228 curr = sport->tx_delay_pos; in bf5xx_pcm_pointer()
230 curr = sport->rx_pos; in bf5xx_pcm_pointer()
234 curr = sport_curr_offset_tx(sport) / sizeof(struct ac97_frame); in bf5xx_pcm_pointer()
236 curr = sport_curr_offset_rx(sport) / sizeof(struct ac97_frame); in bf5xx_pcm_pointer()