Skip to content

Commit

Permalink
ALSA: AACI: use snd_pcm_lib_period_bytes()
Browse files Browse the repository at this point in the history
Use the helper rather than open-coding this.

Signed-off-by: Russell King <[email protected]>
  • Loading branch information
Russell King committed Jan 26, 2011
1 parent f006d8f commit c0dea82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sound/arm/aaci.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,11 @@ static int aaci_pcm_prepare(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime;
struct aaci_runtime *aacirun = runtime->private_data;

aacirun->period = snd_pcm_lib_period_bytes(substream);
aacirun->start = runtime->dma_area;
aacirun->end = aacirun->start + snd_pcm_lib_buffer_bytes(substream);
aacirun->ptr = aacirun->start;
aacirun->period =
aacirun->bytes = frames_to_bytes(runtime, runtime->period_size);
aacirun->bytes = aacirun->period;

return 0;
}
Expand Down
3 changes: 2 additions & 1 deletion sound/arm/aaci.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,15 @@ struct aaci_runtime {
u32 cr;
struct snd_pcm_substream *substream;

unsigned int period; /* byte size of a "period" */

/*
* PIO support
*/
void *start;
void *end;
void *ptr;
int bytes;
unsigned int period;
unsigned int fifosz;
};

Expand Down

0 comments on commit c0dea82

Please sign in to comment.