Lines Matching refs:s
18 int amdtp_tscm_set_parameters(struct amdtp_stream *s, unsigned int rate) in amdtp_tscm_set_parameters() argument
20 struct amdtp_tscm *p = s->protocol; in amdtp_tscm_set_parameters()
23 if (amdtp_stream_running(s)) in amdtp_tscm_set_parameters()
29 if (s->direction == AMDTP_IN_STREAM) in amdtp_tscm_set_parameters()
32 return amdtp_stream_set_parameters(s, rate, data_channels); in amdtp_tscm_set_parameters()
35 static void write_pcm_s32(struct amdtp_stream *s, struct snd_pcm_substream *pcm, in write_pcm_s32() argument
39 struct amdtp_tscm *p = s->protocol; in write_pcm_s32()
47 pcm_buffer_pointer = s->pcm_buffer_pointer + pcm_frames; in write_pcm_s32()
59 buffer += s->data_block_quadlets; in write_pcm_s32()
65 static void read_pcm_s32(struct amdtp_stream *s, struct snd_pcm_substream *pcm, in read_pcm_s32() argument
69 struct amdtp_tscm *p = s->protocol; in read_pcm_s32()
77 pcm_buffer_pointer = s->pcm_buffer_pointer + pcm_frames; in read_pcm_s32()
92 buffer += s->data_block_quadlets; in read_pcm_s32()
98 static void write_pcm_silence(struct amdtp_stream *s, __be32 *buffer, in write_pcm_silence() argument
101 struct amdtp_tscm *p = s->protocol; in write_pcm_silence()
109 buffer += s->data_block_quadlets; in write_pcm_silence()
113 int amdtp_tscm_add_pcm_hw_constraints(struct amdtp_stream *s, in amdtp_tscm_add_pcm_hw_constraints() argument
126 return amdtp_stream_add_pcm_hw_constraints(s, runtime); in amdtp_tscm_add_pcm_hw_constraints()
129 static void read_status_messages(struct amdtp_stream *s, in read_status_messages() argument
132 struct snd_tscm *tscm = container_of(s, struct snd_tscm, tx_stream); in read_status_messages()
143 after = buffer[s->data_block_quadlets - 1]; in read_status_messages()
175 buffer += s->data_block_quadlets; in read_status_messages()
179 static unsigned int process_ir_ctx_payloads(struct amdtp_stream *s, in process_ir_ctx_payloads() argument
193 read_pcm_s32(s, pcm, buf, data_blocks, pcm_frames); in process_ir_ctx_payloads()
197 read_status_messages(s, buf, data_blocks); in process_ir_ctx_payloads()
203 static unsigned int process_it_ctx_payloads(struct amdtp_stream *s, in process_it_ctx_payloads() argument
217 write_pcm_s32(s, pcm, buf, data_blocks, pcm_frames); in process_it_ctx_payloads()
220 write_pcm_silence(s, buf, data_blocks); in process_it_ctx_payloads()
227 int amdtp_tscm_init(struct amdtp_stream *s, struct fw_unit *unit, in amdtp_tscm_init() argument
244 err = amdtp_stream_init(s, unit, dir, flags, fmt, in amdtp_tscm_init()
251 s->ctx_data.rx.fdf = 0x00; in amdtp_tscm_init()
255 p = s->protocol; in amdtp_tscm_init()