Alsa api error: "assertion 'plug-> gen. Slave = plug-> req_slave 'failed"

Source: Internet
Author: User

When using ALSA for audio playback, the following error is always reported when you exit the program:

Pcm_plug.c: 67: snd_pcm_close: assertion 'plug-> gen. Slave = plug-> req_slave 'failedaborted

After finding a circle on the Internet, there are two solutions:

1. Upgrade ALSA. It is said that this error is often reported in version 1.0.14. You can upgrade it. My account is 1.0.23, which is obviously not the reason.

2. check whether there is a problem with the sound card settings. I did this by referring to the code used in the Alsa open-source project, and I was also excluded from it, because the open-source project runs on the board, there is a problem with wood.

After being depressed for a long time, I checked the code carefully and found that the snd_pcm_close () function was called twice. The above error occurred during the second call. Modify the call logic to avoid secondary calls to snd_pcm_close () and solve the problem.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.