All of lore.kernel.org
 help / color / mirror / Atom feed
* Unable to open CAPTURE device
@ 2010-11-30  7:03 Irfan Shaikh
  2010-11-30  9:56 ` Clemens Ladisch
  0 siblings, 1 reply; 5+ messages in thread
From: Irfan Shaikh @ 2010-11-30  7:03 UTC (permalink / raw)
  To: alsa-devel@alsa-project.org

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

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

* Re: Unable to open CAPTURE device
  2010-11-30  7:03 Unable to open CAPTURE device Irfan Shaikh
@ 2010-11-30  9:56 ` Clemens Ladisch
  2010-11-30 10:05   ` Irfan Shaikh
  0 siblings, 1 reply; 5+ messages in thread
From: Clemens Ladisch @ 2010-11-30  9:56 UTC (permalink / raw)
  To: Irfan Shaikh; +Cc: alsa-devel@alsa-project.org

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 an
 y 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.

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

* Re: Unable to open CAPTURE device
  2010-11-30  9:56 ` Clemens Ladisch
@ 2010-11-30 10:05   ` Irfan Shaikh
  2010-11-30 15:35     ` Clemens Ladisch
  0 siblings, 1 reply; 5+ messages in thread
From: Irfan Shaikh @ 2010-11-30 10:05 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel@alsa-project.org

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 an
 y 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.

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

* Re: Unable to open CAPTURE device
  2010-11-30 10:05   ` Irfan Shaikh
@ 2010-11-30 15:35     ` Clemens Ladisch
  2010-12-01  5:33       ` Irfan Shaikh
  0 siblings, 1 reply; 5+ messages in thread
From: Clemens Ladisch @ 2010-11-30 15:35 UTC (permalink / raw)
  To: Irfan Shaikh; +Cc: alsa-devel@alsa-project.org

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

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

* Re: Unable to open CAPTURE device
  2010-11-30 15:35     ` Clemens Ladisch
@ 2010-12-01  5:33       ` Irfan Shaikh
  0 siblings, 0 replies; 5+ messages in thread
From: Irfan Shaikh @ 2010-12-01  5:33 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel@alsa-project.org

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

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

end of thread, other threads:[~2010-12-01  5:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-30  7:03 Unable to open CAPTURE device Irfan Shaikh
2010-11-30  9:56 ` Clemens Ladisch
2010-11-30 10:05   ` Irfan Shaikh
2010-11-30 15:35     ` Clemens Ladisch
2010-12-01  5:33       ` 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.