All of lore.kernel.org
 help / color / mirror / Atom feed
* Query about Playback device name
@ 2011-03-09  8:32 Irfan Shaikh
  2011-03-09 11:45 ` Clemens Ladisch
  0 siblings, 1 reply; 5+ messages in thread
From: Irfan Shaikh @ 2011-03-09  8:32 UTC (permalink / raw)
  To: alsa-devel@alsa-project.org

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Query about Playback device name
  2011-03-09  8:32 Query about Playback device name Irfan Shaikh
@ 2011-03-09 11:45 ` Clemens Ladisch
  2011-03-09 11:46   ` Irfan Shaikh
  0 siblings, 1 reply; 5+ messages in thread
From: Clemens Ladisch @ 2011-03-09 11:45 UTC (permalink / raw)
  To: Irfan Shaikh; +Cc: alsa-devel@alsa-project.org

Irfan Shaikh wrote:
> aplay uses following device
> "aplay -Dplug:mcasp3 411.2Kbps-44.1Khz-16bits-2CH-PCM.wav"
> 
> I want to use same device i.e "plug:mcasp3" in my plaback application
> 
> Can i use following section of code to use "plug:mcasp3" as playback device?
> 
>     alsaParams->playback_device = strdup("plug:mcasp3");
>     if (snd_pcm_open(&alsaParams->playback_handle,
>                      alsaParams->playback_device,

Yes.

> SASKEN BUSINESS DISCLAIMER:

*** DISCLAIMER ***
This e-mail contains public information intended for any subscriber of
this mailing list and for anybody else who bothers to read it; it will
be copied, disclosed and distributed to the public.  If you think you
are not the intended recipient, please commit suicide immediately.
These terms apply also to any e-mails quoted in, referenced from, or
answering this e-mail, and supersede any disclaimers in those e-mails.
Additionally, disclaimers in those e-mails will incur legal processing
fees of $42 per line; you have agreed to this by reading this disclaimer.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Query about Playback device name
  2011-03-09 11:45 ` Clemens Ladisch
@ 2011-03-09 11:46   ` Irfan Shaikh
  2011-03-09 14:22     ` Clemens Ladisch
  0 siblings, 1 reply; 5+ messages in thread
From: Irfan Shaikh @ 2011-03-09 11:46 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel@alsa-project.org

Hello Clemens,


#################################################################################################################################

I get following error on console if i use  plug:mcasp3  instead  plughw:0,0
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM mcasp3

/********************************************************/
     //alsaParams->playback_device = strdup("plughw:0,0");    /*commented*/
     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)
     {
        printf("Error opening PCM device %s\n", alsaParams->playback_device);
        return NULL;
     }

/********************************************************/

# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: EVM [TI81XX EVM], device 0: McASP3 bdrsecodec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: EVM [TI81XX EVM], device 1: McASP4 bdrsecodec-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

#################################################################################################################################

Regards
Irfan


________________________________________
From: Clemens Ladisch [clemens@ladisch.de]
Sent: Wednesday, March 09, 2011 5:15 PM
To: Irfan Shaikh
Cc: alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] Query about Playback device name

Irfan Shaikh wrote:
> aplay uses following device
> "aplay -Dplug:mcasp3 411.2Kbps-44.1Khz-16bits-2CH-PCM.wav"
>
> I want to use same device i.e "plug:mcasp3" in my plaback application
>
> Can i use following section of code to use "plug:mcasp3" as playback device?
>
>     alsaParams->playback_device = strdup("plug:mcasp3");
>     if (snd_pcm_open(&alsaParams->playback_handle,
>                      alsaParams->playback_device,

Yes.

> SASKEN BUSINESS DISCLAIMER:

*** DISCLAIMER ***
This e-mail contains public information intended for any subscriber of
this mailing list and for anybody else who bothers to read it; it will
be copied, disclosed and distributed to the public.  If you think you
are not the intended recipient, please commit suicide immediately.
These terms apply also to any e-mails quoted in, referenced from, or
answering this e-mail, and supersede any disclaimers in those e-mails.
Additionally, disclaimers in those e-mails will incur legal processing
fees of $42 per line; you have agreed to this by reading this disclaimer.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Query about Playback device name
  2011-03-09 11:46   ` Irfan Shaikh
@ 2011-03-09 14:22     ` Clemens Ladisch
  2011-03-09 15:03       ` Irfan Shaikh
  0 siblings, 1 reply; 5+ messages in thread
From: Clemens Ladisch @ 2011-03-09 14:22 UTC (permalink / raw)
  To: Irfan Shaikh; +Cc: alsa-devel@alsa-project.org

Irfan Shaikh wrote:
> I get following error on console if i use  plug:mcasp3  instead  plughw:0,0
> ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM mcasp3

Do aplay and your program run on same computer as the same user?


Regards,
Clemens

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Query about Playback device name
  2011-03-09 14:22     ` Clemens Ladisch
@ 2011-03-09 15:03       ` Irfan Shaikh
  0 siblings, 0 replies; 5+ messages in thread
From: Irfan Shaikh @ 2011-03-09 15:03 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel@alsa-project.org

YES....
I am running my application as well as aplay on the same embedded platform with same user

________________________________________
From: Clemens Ladisch [clemens@ladisch.de]
Sent: Wednesday, March 09, 2011 7:52 PM
To: Irfan Shaikh
Cc: alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] Query about Playback device name

Irfan Shaikh wrote:
> I get following error on console if i use  plug:mcasp3  instead  plughw:0,0
> ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM mcasp3

Do aplay and your program run on same computer as the same user?


Regards,
Clemens

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-03-09 15:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-09  8:32 Query about Playback device name Irfan Shaikh
2011-03-09 11:45 ` Clemens Ladisch
2011-03-09 11:46   ` Irfan Shaikh
2011-03-09 14:22     ` Clemens Ladisch
2011-03-09 15:03       ` Irfan Shaikh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.