Create ALSA device with 1 channel from 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Due to a program that can only work using mono devices, I need to convert my microphone's device, which is stereo only, into a mono device.

The correct device can be seen from arecord as this:

$ arecord -L
.....
front:CARD=Generic,DEV=0
    HD-Audio Generic, CS4207 Analog
    Front speakers
.....

So I tried to create a new device into the /usr/share/alsa/alsa.conf file. I've tried with this:

pcm.makemono {          
        type plug     
        slave.pcm { 
                type route                    
                slave.pcm "pcm.front"
                slave.channels 2
                ttable { 
                        0.0 1 
                        1.0 1
                }                  
        }                              
}

Where I've found pcm.front some lines before in the file as

pcm.front cards.pcm.front

(I'm not sure that using "pcm.front" in my makemono device is correct)

However, calling arecord with this device and a single channel still gives me problems. At the same time, calling arecord with any device names seems not to create any type of complaint, so I'm wondering whether this new `makemono` device has been correctly parsed and recognized by ALSA.

I'm currently trying to record the device with

$ arecord -f cd -d makemono -c 1 -V stereo /tmp/file

How can I check that this new device actually exists and does what I need?

Thanks in advance for any help.

Best,
Eugenio
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux