mirror of
https://github.com/openharmony/third_party_tinyalsa.git
synced 2026-07-19 15:24:22 -04:00
Merge pull request #111 from mgaio/topic/fix-pcm_readi
Fix pcm_writei return value if pcm is in not running state.
This commit is contained in:
@@ -695,7 +695,7 @@ int pcm_writei(struct pcm *pcm, const void *data, unsigned int frame_count)
|
||||
if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_WRITEI_FRAMES, &x))
|
||||
return oops(pcm, errno, "cannot write initial data");
|
||||
pcm->running = 1;
|
||||
return 0;
|
||||
return x.result;
|
||||
}
|
||||
if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_WRITEI_FRAMES, &x)) {
|
||||
pcm->prepared = 0;
|
||||
|
||||
Reference in New Issue
Block a user