mirror of
https://github.com/openharmony/third_party_tinyalsa.git
synced 2026-07-19 15:24:22 -04:00
pcm: Do not set values after control/status mmap
It's not necessary to send appl_ptr or avail_min to the kernel here. In prepare action, called later in pcm_open(), appl_ptr becomes zero. avail_min is already defined in software parameters. Signed-off-by: Ricardo Biehl Pasquali <pasqualirb@gmail.com>
This commit is contained in:
@@ -549,7 +549,6 @@ static int pcm_hw_mmap_status(struct pcm *pcm)
|
||||
pcm->mmap_status = NULL;
|
||||
goto mmap_error;
|
||||
}
|
||||
pcm->mmap_control->avail_min = 1;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -560,8 +559,6 @@ mmap_error:
|
||||
return -ENOMEM;
|
||||
pcm->mmap_status = &pcm->sync_ptr->s.status;
|
||||
pcm->mmap_control = &pcm->sync_ptr->c.control;
|
||||
pcm->mmap_control->avail_min = 1;
|
||||
pcm_sync_ptr(pcm, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user