static unsigned int process_tx_data_blocks(struct amdtp_stream *s, __be32 *buffer, unsigned int data_blocks, unsigned int *syt) { struct snd_pcm_substream *pcm; pcm = READ_ONCE(s->pcm); if (data_blocks > 0 && pcm) read_pcm_s32(s, pcm, buffer, data_blocks); read_status_messages(s, buffer, data_blocks); return data_blocks; }
static unsigned int process_tx_data_blocks(struct amdtp_stream *s, __be32 *buffer, unsigned int data_blocks, unsigned int *syt) { struct amdtp_am824 *p = s->protocol; struct snd_pcm_substream *pcm = ACCESS_ONCE(s->pcm); unsigned int pcm_frames; if (pcm) { read_pcm_s32(s, pcm, buffer, data_blocks); pcm_frames = data_blocks * p->frame_multiplier; } else { pcm_frames = 0; } if (p->midi_ports) read_midi_messages(s, buffer, data_blocks); return pcm_frames; }