mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
ALSA: AACI: cleanup aaci_pcm_hw_params
Since the recording and playback paths are now the same, eliminate the needless conditionals. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
6ca867c827
commit
4e30b69108
1 changed files with 7 additions and 11 deletions
|
@ -438,18 +438,14 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream,
|
||||||
|
|
||||||
err = snd_pcm_lib_malloc_pages(substream,
|
err = snd_pcm_lib_malloc_pages(substream,
|
||||||
params_buffer_bytes(params));
|
params_buffer_bytes(params));
|
||||||
if (err < 0)
|
if (err >= 0) {
|
||||||
goto out;
|
err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
|
||||||
|
params_channels(params),
|
||||||
|
aacirun->pcm->r[0].slots);
|
||||||
|
|
||||||
err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
|
aacirun->pcm_open = err == 0;
|
||||||
params_channels(params),
|
}
|
||||||
aacirun->pcm->r[0].slots);
|
|
||||||
if (err)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
aacirun->pcm_open = 1;
|
|
||||||
|
|
||||||
out:
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,7 +454,7 @@ static int aaci_pcm_prepare(struct snd_pcm_substream *substream)
|
||||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||||
struct aaci_runtime *aacirun = runtime->private_data;
|
struct aaci_runtime *aacirun = runtime->private_data;
|
||||||
|
|
||||||
aacirun->start = (void *)runtime->dma_area;
|
aacirun->start = runtime->dma_area;
|
||||||
aacirun->end = aacirun->start + snd_pcm_lib_buffer_bytes(substream);
|
aacirun->end = aacirun->start + snd_pcm_lib_buffer_bytes(substream);
|
||||||
aacirun->ptr = aacirun->start;
|
aacirun->ptr = aacirun->start;
|
||||||
aacirun->period =
|
aacirun->period =
|
||||||
|
|
Loading…
Reference in a new issue