[alsa-devel] LEFT or RIGHT Channel in alsa mixer

Navink Singh navink.singh at tcs.com
Thu Oct 1 19:26:54 CEST 2009


Hi Developers,

              I need to configure my audio device such as to use only LEFT 
or RIGHT Channel.
I have carried out following steps to proceed with

1) Opened PCM playback Device
2) Configured its hardware and Software parameters
3) Open mixer
4) Attached Mixer to playback device
5) Registered Mixer
6) Loaded the mixer
7) Get the first element of mixer

A)
    Now when i use following API, snd_mixer_selem_is_playback_mono(aElem); 
i found mixer is using MONO channel.
But i am configuring my PCM Device for 2 channels

    I am using snd_mixer_selem_set_playback_switch() API to set right or 
Left channel to MUTE {Does not work}

    If i set all channels to Mute {Works fine}
              snd_mixer_selem_set_playback_switch_all (aElem, 0)

    Also i am able to set SND_MIXER_SCHN_MONO to mute {works fine}
              snd_mixer_selem_set_playback_switch(aElem, 
SND_MIXER_SCHN_MONO, 0)

B)
    There is also an API in my MIXER driver to set the right and left 
balance, but i did not find
any API in Application to do so {Is there any such API in Application}.


Thanks in Advance,

Navin Kumar Singh
Tata Consultancy Services
DLF Akruti Info Park,
PN 28,
Rajiv Gandhi Infotech Park   Hinjewadi, PHASE II
Pune - 411057,Maharashtra
India
Ph:- +91 20 66752458
Cell:- +919860227357
Mailto: navink.singh at tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty.   IT Services
                        Business Solutions
                        Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




More information about the Alsa-devel mailing list