Configuration (. ASOUNDRC profile) that uses the ALSA plug-in to play 5.1-channel audio over a 2-channel stereo card

Source: Internet
Author: User

Just contact Alsa, I learned no one's words really very laborious. A lot of information on the internet did not have this explanation, finally see the official plug-in configuration document according to the personal understanding of the written experience:
(1) First look at the route plugin description:

This plugin can convert channels and change the volume. The configuration instructions are as follows:

Pcm.name {Type route # route & Volume Conversion PCM slave STR # slave name# orslave {# slave definition pcm STR # slave PCM name# orPCM {} # Slave PCM definition [format STR] # Slave format [channels INT] # Slav E channels} ttable {# Transfer table (bi-dimensional compound of cchannels * schannels numb ERs) Cchannel {SCHANNEL REAL # route value (0.0-1.0)}}}
(2) Take a look at the configuration example of 2-channel stereo conversion to mono:
pcm.makemono {    type route    slave.pcm "hw:0"    ttable {        0.0 1    # in-channel 0, out-channel 0, 100% volume        1.0 1    # in-channel 1, out-channel 0, 100% volume    }}

Pcm.downmix {
 type route SLAVE.PCM" hw:0.0 "ttable {0.0 1 # in-channel 0, Out-channel 0, 100% Volume 1.1 1 # in-channel 1, Out-channel 1, 100% volume  
 2.0 1  
 3.1 1  
 4.0 0.5  
 4.1 0.5  
 5.0 0.5  
        5.1 0.5   #意思是输入第5通道的数据传输给输出通道1,并且音量降低一半    }}
The following diagram can be used to map the above configuration:

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Configuration (. ASOUNDRC profile) that uses the ALSA plug-in to play 5.1-channel audio over a 2-channel stereo card

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.