[alsa-devel] Unable to open CAPTURE device

Irfan Shaikh irfan.shaikh at sasken.com
Tue Nov 30 08:03:12 CET 2010


Hello,

         I have connected ipod to my hardware (using USB) and i want to read the audio pcm data from ipod. I am running following section of code to detect connection of ipod. But i am not finding any capture device connected.
        Am i giving some wrong name of capture device ? If wrong how can i find correct name of Audio Capture device.

/***********************************************************************************************************************************************/
const char *capture_device="plughw:1,0";

while((retVal = snd_pcm_open( &pcm_capture, (const char *)capture_device, SND_PCM_STREAM_CAPTURE, 1))!=0)
{
  if (retVal != 0){
    printf("Opening Capture device FAILED\n");
    printf("Still waiting for Capture device to be connected\n");
    usleep(5000);
  }
}
/***********************************************************************************************************************************************/
OUTPUT :

Opening Capture device FAILED
Still waiting for Capture device to be connected
ALSA lib pcm_hw.c:1433:(_snd_pcm_hw_open) Invalid value for card
Opening Capture device FAILED
Still waiting for Capture device to be connected
ALSA lib pcm_hw.c:1433:(_snd_pcm_hw_open) Invalid value for card
Opening Capture device FAILED
Still waiting for Capture device to be connected
ALSA lib pcm_hw.c:1433:(_snd_pcm_hw_open) Invalid value for card
Opening Capture device FAILED
Still waiting for Capture device to be connected
ALSA lib pcm_hw.c:1433:(_snd_pcm_hw_open) Invalid value for card
Opening Capture device FAILED
Still waiting for Capture device to be connected
.
.
.
.
.
.
.
/*Continues*/
.
.
.
.
.
.
.
.
.
.
.
.
.

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