• Home
  • Raw
  • Download

Lines Matching refs:tscm

21 static int pcm_init_hw_params(struct snd_tscm *tscm,  in pcm_init_hw_params()  argument
48 stream = &tscm->tx_stream; in pcm_init_hw_params()
49 pcm_channels = tscm->spec->pcm_capture_analog_channels; in pcm_init_hw_params()
53 stream = &tscm->rx_stream; in pcm_init_hw_params()
54 pcm_channels = tscm->spec->pcm_playback_analog_channels; in pcm_init_hw_params()
57 if (tscm->spec->has_adat) in pcm_init_hw_params()
59 if (tscm->spec->has_spdif) in pcm_init_hw_params()
70 struct snd_tscm *tscm = substream->private_data; in pcm_open() local
75 err = snd_tscm_stream_lock_try(tscm); in pcm_open()
79 err = pcm_init_hw_params(tscm, substream); in pcm_open()
83 err = snd_tscm_stream_get_clock(tscm, &clock); in pcm_open()
88 amdtp_stream_pcm_running(&tscm->rx_stream) || in pcm_open()
89 amdtp_stream_pcm_running(&tscm->tx_stream)) { in pcm_open()
90 err = snd_tscm_stream_get_rate(tscm, &rate); in pcm_open()
101 snd_tscm_stream_lock_release(tscm); in pcm_open()
107 struct snd_tscm *tscm = substream->private_data; in pcm_close() local
109 snd_tscm_stream_lock_release(tscm); in pcm_close()
117 struct snd_tscm *tscm = substream->private_data; in pcm_capture_hw_params() local
126 mutex_lock(&tscm->mutex); in pcm_capture_hw_params()
127 tscm->substreams_counter++; in pcm_capture_hw_params()
128 mutex_unlock(&tscm->mutex); in pcm_capture_hw_params()
131 amdtp_tscm_set_pcm_format(&tscm->tx_stream, params_format(hw_params)); in pcm_capture_hw_params()
139 struct snd_tscm *tscm = substream->private_data; in pcm_playback_hw_params() local
148 mutex_lock(&tscm->mutex); in pcm_playback_hw_params()
149 tscm->substreams_counter++; in pcm_playback_hw_params()
150 mutex_unlock(&tscm->mutex); in pcm_playback_hw_params()
153 amdtp_tscm_set_pcm_format(&tscm->rx_stream, params_format(hw_params)); in pcm_playback_hw_params()
160 struct snd_tscm *tscm = substream->private_data; in pcm_capture_hw_free() local
162 mutex_lock(&tscm->mutex); in pcm_capture_hw_free()
165 tscm->substreams_counter--; in pcm_capture_hw_free()
167 snd_tscm_stream_stop_duplex(tscm); in pcm_capture_hw_free()
169 mutex_unlock(&tscm->mutex); in pcm_capture_hw_free()
176 struct snd_tscm *tscm = substream->private_data; in pcm_playback_hw_free() local
178 mutex_lock(&tscm->mutex); in pcm_playback_hw_free()
181 tscm->substreams_counter--; in pcm_playback_hw_free()
183 snd_tscm_stream_stop_duplex(tscm); in pcm_playback_hw_free()
185 mutex_unlock(&tscm->mutex); in pcm_playback_hw_free()
192 struct snd_tscm *tscm = substream->private_data; in pcm_capture_prepare() local
196 mutex_lock(&tscm->mutex); in pcm_capture_prepare()
198 err = snd_tscm_stream_start_duplex(tscm, runtime->rate); in pcm_capture_prepare()
200 amdtp_stream_pcm_prepare(&tscm->tx_stream); in pcm_capture_prepare()
202 mutex_unlock(&tscm->mutex); in pcm_capture_prepare()
209 struct snd_tscm *tscm = substream->private_data; in pcm_playback_prepare() local
213 mutex_lock(&tscm->mutex); in pcm_playback_prepare()
215 err = snd_tscm_stream_start_duplex(tscm, runtime->rate); in pcm_playback_prepare()
217 amdtp_stream_pcm_prepare(&tscm->rx_stream); in pcm_playback_prepare()
219 mutex_unlock(&tscm->mutex); in pcm_playback_prepare()
226 struct snd_tscm *tscm = substream->private_data; in pcm_capture_trigger() local
230 amdtp_stream_pcm_trigger(&tscm->tx_stream, substream); in pcm_capture_trigger()
233 amdtp_stream_pcm_trigger(&tscm->tx_stream, NULL); in pcm_capture_trigger()
244 struct snd_tscm *tscm = substream->private_data; in pcm_playback_trigger() local
248 amdtp_stream_pcm_trigger(&tscm->rx_stream, substream); in pcm_playback_trigger()
251 amdtp_stream_pcm_trigger(&tscm->rx_stream, NULL); in pcm_playback_trigger()
262 struct snd_tscm *tscm = sbstrm->private_data; in pcm_capture_pointer() local
264 return amdtp_stream_pcm_pointer(&tscm->tx_stream); in pcm_capture_pointer()
269 struct snd_tscm *tscm = sbstrm->private_data; in pcm_playback_pointer() local
271 return amdtp_stream_pcm_pointer(&tscm->rx_stream); in pcm_playback_pointer()
299 int snd_tscm_create_pcm_devices(struct snd_tscm *tscm) in snd_tscm_create_pcm_devices() argument
304 err = snd_pcm_new(tscm->card, tscm->card->driver, 0, 1, 1, &pcm); in snd_tscm_create_pcm_devices()
308 pcm->private_data = tscm; in snd_tscm_create_pcm_devices()
310 "%s PCM", tscm->card->shortname); in snd_tscm_create_pcm_devices()