Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
* sound over USB
@ 2020-05-12 16:43 Subhashini Rao Beerisetty
  2020-05-12 16:53 ` Greg KH
       [not found] ` <bb16e374-3d9f-427c-8470-3542dc697fdb@www.fastmail.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Subhashini Rao Beerisetty @ 2020-05-12 16:43 UTC (permalink / raw)
  To: kernelnewbies, alsa-devel, linux-usb

 Hi all,

In my Linux machine, I connected the plantronics usb headset with mic
and I see(with the help of dmesg) that this device detected.



[116676.507868] usb 2-2: new full-speed USB device number 5 using xhci_hcd
[116676.923445] usb 2-2: New USB device found, idVendor=047f, idProduct=c012
 [116676.927091] usb 2-2: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
 [116676.934252] usb 2-2: Product: Plantronics .Audio 628 USB
 [116676.941445] usb 2-2: Manufacturer: Plantronics
 [116676.945731] usb 2-2: ep 0x84 - rounding interval to 64
microframes, ep desc says 80 microframes
 [116677.078071] hidraw: raw HID events driver (C) Jiri Kosina
 [116677.159669] usbcore: registered new interface driver usbhid
 [116677.161686] usbhid: USB HID core driver
 [116677.175458] input: Plantronics Plantronics .Audio 628 USB as
/devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.3/0003:047F:C012.0001/input/input4
 [116677.234588] plantronics 0003:047F:C012.0001:
input,hiddev0,hidraw0: USB HID v1.00 Device [Plantronics Plantronics
.Audio 628 USB] on usb-0000:00:14.0-2/input3
 [116677.281756] usbcore: registered new interface driver snd-usb-audio

 The following nodes are present in the /dev/snd

$ ls -l /dev/snd/

total 0

drwxr-xr-x 2 root root       60 May 12 11:32 by-id

drwxr-xr-x 2 root root       60 May 12 11:32 by-path

crw-rw---- 1 root audio 116,  2 May 12 11:32 controlC1

crw-rw---- 1 root audio 116,  4 May 12 11:32 pcmC1D0c

crw-rw---- 1 root audio 116,  3 May 12 11:32 pcmC1D0p

crw-rw---- 1 root audio 116,  1 May 12 11:32 seq

crw-rw---- 1 root audio 116, 33 May 12 11:32 timer



What are all these devices present in /dev/snd

How do I use it for playing and recording an audio?

Basically first I want to gain knowledge on set of test cases I can
run on ALSA and then learn ALSA kernel modules stuff including
snd_usb_audio mdule.

So please guide me by providing related documentation/Steps.



Thanks,

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

* Re: sound over USB
  2020-05-12 16:43 sound over USB Subhashini Rao Beerisetty
@ 2020-05-12 16:53 ` Greg KH
  2020-05-13 13:02   ` Ricard Wanderlof
       [not found] ` <bb16e374-3d9f-427c-8470-3542dc697fdb@www.fastmail.com>
  1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2020-05-12 16:53 UTC (permalink / raw)
  To: Subhashini Rao Beerisetty; +Cc: alsa-devel, linux-usb, kernelnewbies

On Tue, May 12, 2020 at 10:13:10PM +0530, Subhashini Rao Beerisetty wrote:
>  Hi all,
> 
> In my Linux machine, I connected the plantronics usb headset with mic
> and I see(with the help of dmesg) that this device detected.
> 
> 
> 
> [116676.507868] usb 2-2: new full-speed USB device number 5 using xhci_hcd
> [116676.923445] usb 2-2: New USB device found, idVendor=047f, idProduct=c012
>  [116676.927091] usb 2-2: New USB device strings: Mfr=1, Product=2,
> SerialNumber=0
>  [116676.934252] usb 2-2: Product: Plantronics .Audio 628 USB
>  [116676.941445] usb 2-2: Manufacturer: Plantronics
>  [116676.945731] usb 2-2: ep 0x84 - rounding interval to 64
> microframes, ep desc says 80 microframes
>  [116677.078071] hidraw: raw HID events driver (C) Jiri Kosina
>  [116677.159669] usbcore: registered new interface driver usbhid
>  [116677.161686] usbhid: USB HID core driver
>  [116677.175458] input: Plantronics Plantronics .Audio 628 USB as
> /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.3/0003:047F:C012.0001/input/input4
>  [116677.234588] plantronics 0003:047F:C012.0001:
> input,hiddev0,hidraw0: USB HID v1.00 Device [Plantronics Plantronics
> .Audio 628 USB] on usb-0000:00:14.0-2/input3
>  [116677.281756] usbcore: registered new interface driver snd-usb-audio
> 
>  The following nodes are present in the /dev/snd
> 
> $ ls -l /dev/snd/
> 
> total 0
> 
> drwxr-xr-x 2 root root       60 May 12 11:32 by-id
> 
> drwxr-xr-x 2 root root       60 May 12 11:32 by-path
> 
> crw-rw---- 1 root audio 116,  2 May 12 11:32 controlC1
> 
> crw-rw---- 1 root audio 116,  4 May 12 11:32 pcmC1D0c
> 
> crw-rw---- 1 root audio 116,  3 May 12 11:32 pcmC1D0p
> 
> crw-rw---- 1 root audio 116,  1 May 12 11:32 seq
> 
> crw-rw---- 1 root audio 116, 33 May 12 11:32 timer
> 
> 
> 
> What are all these devices present in /dev/snd
> 
> How do I use it for playing and recording an audio?
> 
> Basically first I want to gain knowledge on set of test cases I can
> run on ALSA and then learn ALSA kernel modules stuff including
> snd_usb_audio mdule.
> 
> So please guide me by providing related documentation/Steps.

ALSA should "just work" with this device, no need to do anything to the
kernel driver.  Does it not work properly for you as-is?

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

* Re: sound over USB
  2020-05-12 16:53 ` Greg KH
@ 2020-05-13 13:02   ` Ricard Wanderlof
  0 siblings, 0 replies; 4+ messages in thread
From: Ricard Wanderlof @ 2020-05-13 13:02 UTC (permalink / raw)
  To: Greg KH; +Cc: alsa-devel, linux-usb, Subhashini Rao Beerisetty, kernelnewbies


On Tue, 12 May 2020, Greg KH wrote:

> On Tue, May 12, 2020 at 10:13:10PM +0530, Subhashini Rao Beerisetty wrote:
> > ...
> >  [116677.281756] usbcore: registered new interface driver snd-usb-audio
> >
> >  The following nodes are present in the /dev/snd
> >
> > $ ls -l /dev/snd/
> >
> > total 0
> >
> > drwxr-xr-x 2 root root       60 May 12 11:32 by-id
> >
> > drwxr-xr-x 2 root root       60 May 12 11:32 by-path
> >
> > crw-rw---- 1 root audio 116,  2 May 12 11:32 controlC1
> >
> > crw-rw---- 1 root audio 116,  4 May 12 11:32 pcmC1D0c
> >
> > crw-rw---- 1 root audio 116,  3 May 12 11:32 pcmC1D0p
> >
> > crw-rw---- 1 root audio 116,  1 May 12 11:32 seq
> >
> > crw-rw---- 1 root audio 116, 33 May 12 11:32 timer
> >
> >
> >
> > What are all these devices present in /dev/snd
> >
> > How do I use it for playing and recording an audio?
> >
> > Basically first I want to gain knowledge on set of test cases I can
> > run on ALSA and then learn ALSA kernel modules stuff including
> > snd_usb_audio mdule.
> >
> > So please guide me by providing related documentation/Steps.
> 
> ALSA should "just work" with this device, no need to do anything to the
> kernel driver.  Does it not work properly for you as-is?

To clarify (if it's not too obvious): Normally these devices are never 
accessed directly by programs, instead, there is a userspace library 
called alsa-lib which provides a userspace API and then handles the 
communication with the kernel devices.

/Ricard
-- 
Ricard Wolf Wanderlof                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

* Re: sound over USB
       [not found] ` <bb16e374-3d9f-427c-8470-3542dc697fdb@www.fastmail.com>
@ 2020-05-14 13:42   ` Subhashini Rao Beerisetty
  0 siblings, 0 replies; 4+ messages in thread
From: Subhashini Rao Beerisetty @ 2020-05-14 13:42 UTC (permalink / raw)
  To: Sid Spry; +Cc: alsa-devel, linux-usb, kernelnewbies

On Wed, May 13, 2020 at 8:53 PM Sid Spry <sid@aeam.us> wrote:
>
> On Tue, May 12, 2020, at 11:43 AM, Subhashini Rao Beerisetty wrote>
> >
> > How do I use it for playing and recording an audio?
> >
> > Basically first I want to gain knowledge on set of test cases I can
> > run on ALSA and then learn ALSA kernel modules stuff including
> > snd_usb_audio mdule.
> >
> > So please guide me by providing related documentation/Steps.
> >
>
> Hi, searching for an ALSA tutorial will get you far. However on a modern Linux distribution you will likely want to target pulseaudio. There are other libraries like RtAudio or PortAudio that may be easier to use and are cross platform.
>
> ALSA seems to give the most reliable results when enumerating audio devices. This can be done when pulseaudio is installed. The pulseaudio results are harder to interpret.
>
> In my experience, and not necessarily targeted at you, I have experienced massive difficulties getting RtAudio and PortAudio working in a reproducible way. ALSA is the most reliable but an unusual configuration, and pulseaudio is a hot complicated mess.
>
>
> For what it's worth, the sound API on Linux is so pointlessly complex that I have, in the past, created a custom USB driver to avoid going through the sound API. It was easier to use libusb and get raw samples.
Great. Does the custom USB driver is available in public repository?

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12 16:43 sound over USB Subhashini Rao Beerisetty
2020-05-12 16:53 ` Greg KH
2020-05-13 13:02   ` Ricard Wanderlof
     [not found] ` <bb16e374-3d9f-427c-8470-3542dc697fdb@www.fastmail.com>
2020-05-14 13:42   ` Subhashini Rao Beerisetty

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org
	public-inbox-index kernelnewbies

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git