mirror of
https://gitee.com/openharmony/third_party_alsa-lib
synced 2024-11-27 09:40:32 +00:00
Fixed I/O plugin insert
This commit is contained in:
parent
a6aee7bee0
commit
944f6f31ca
@ -243,7 +243,7 @@ int snd_pcm_plugin_params(snd_pcm_t *pcm, snd_pcm_channel_params_t *params)
|
||||
|
||||
snd_pcm_plugin_clear(pcm, params->channel);
|
||||
|
||||
/* add necessary plugins */
|
||||
/* add necessary plugins */
|
||||
memcpy(¶ms1, params, sizeof(*params));
|
||||
if ((err = snd_pcm_plugin_format(pcm, ¶ms1, &hwparams, &hwinfo)) < 0)
|
||||
return err;
|
||||
@ -252,10 +252,10 @@ int snd_pcm_plugin_params(snd_pcm_t *pcm, snd_pcm_channel_params_t *params)
|
||||
* I/O plugins
|
||||
*/
|
||||
|
||||
if (hwinfo.mode == SND_PCM_MODE_STREAM) {
|
||||
if (params->mode == SND_PCM_MODE_STREAM) {
|
||||
pdprintf("params stream plugin\n");
|
||||
err = snd_pcm_plugin_build_stream(pcm, params->channel, &plugin);
|
||||
} else if (hwinfo.mode == SND_PCM_MODE_BLOCK) {
|
||||
} else if (params->mode == SND_PCM_MODE_BLOCK) {
|
||||
if (hwinfo.flags & SND_PCM_CHNINFO_MMAP) {
|
||||
pdprintf("params mmap plugin\n");
|
||||
err = snd_pcm_plugin_build_mmap(pcm, params->channel, &plugin);
|
||||
|
Loading…
Reference in New Issue
Block a user