[alsa-devel] Query about Playback device name

Irfan Shaikh irfan.shaikh at sasken.com
Wed Mar 9 09:32:43 CET 2011


Hello,

         aplay uses following device
"aplay -Dplug:mcasp3 411.2Kbps-44.1Khz-16bits-2CH-PCM.wav"
 Playing WAVE '411.2Kbps-44.1Khz-16bits-2CH-PCM.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

         I want to use same device i.e "plug:mcasp3" in my plaback application

1) Earlier i use to use default device
   //alsaParams->playback_device = strdup("plughw:0,0");

2)  Can i use following section of code to use    "plug:mcasp3"  as playback device? Will following section of code work ??????

    alsaParams->playback_device = strdup("plug:mcasp3");                 <<<<<------------------------<<<<<<<-----------------<<<<<<<

    snd_pcm_hw_params_alloca(&alsaParams->hwparams_playback);

    /*Open PCM Playback device*/
    if (snd_pcm_open(&alsaParams->playback_handle,
                     alsaParams->playback_device,
                     alsaParams->stream,
                     alsaParams->device_mode) < 0)

Thanks and regards


SASKEN BUSINESS DISCLAIMER: This message may contain confidential, proprietary or legally privileged information. In case you are not the original intended Recipient of the message, you must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message and you are requested to delete it and inform the sender. Any views expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by Sasken Communication Technologies Limited ("Sasken") unless sent with that express intent and with due authority of Sasken. Sasken has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email.
Read Disclaimer at http://www.sasken.com/extras/mail_disclaimer.html


More information about the Alsa-devel mailing list