[alsa-devel] Unable to open CAPTURE device
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
Irfan Shaikh wrote:
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.
The iPod is not a USB audio capture device.
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
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 confidentiality notices in those e-mails. Additionally, confidentiality notices in those e-mails will incur legal processing fees of $42 per line; you have agreed to this by reading this confidentiality notice.
But Since ipod is connected using USB interface (USB Audio Class device). Wont it be treated as USB Audio capture device ?
________________________________________ From: Clemens Ladisch [clemens@ladisch.de] Sent: Tuesday, November 30, 2010 3:26 PM To: Irfan Shaikh Cc: alsa-devel@alsa-project.org Subject: Re: [alsa-devel] Unable to open CAPTURE device
Irfan Shaikh wrote:
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.
The iPod is not a USB audio capture device.
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
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 confidentiality notices in those e-mails. Additionally, confidentiality notices in those e-mails will incur legal processing fees of $42 per line; you have agreed to this by reading this confidentiality notice.
Now i am able to open ipod as capture device. The problem was ipod was been shown as the mass storage device (/dev/sda1). //snd_pcm_open was failing I reconfigured my ipod so that is is being showed as usbaudio class device. // Works fine now
Thanks for your inputs, Regards Irfan ________________________________________ From: Clemens Ladisch [clemens@ladisch.de] Sent: Tuesday, November 30, 2010 9:05 PM To: Irfan Shaikh Cc: alsa-devel@alsa-project.org Subject: Re: [alsa-devel] Unable to open CAPTURE device
Irfan Shaikh wrote:
But Since ipod is connected using USB interface (USB Audio Class device). Wont it be treated as USB Audio capture device ?
In that case, yes.
Does the device show up in /proc/asound/cards?
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
participants (2)
-
Clemens Ladisch
-
Irfan Shaikh