All of lore.kernel.org
 help / color / mirror / Atom feed
* sound over USB
@ 2020-05-12 16:43 ` Subhashini Rao Beerisetty
  0 siblings, 0 replies; 13+ 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,

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

* sound over USB
@ 2020-05-12 16:43 ` Subhashini Rao Beerisetty
  0 siblings, 0 replies; 13+ 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] 13+ messages in thread

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

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

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

* Re: sound over USB
@ 2020-05-12 16:53   ` Greg KH
  0 siblings, 0 replies; 13+ 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

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

* Re: sound over USB
@ 2020-05-12 16:53   ` Greg KH
  0 siblings, 0 replies; 13+ 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] 13+ messages in thread

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

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

* Re: sound over USB
@ 2020-05-13 13:02     ` Ricard Wanderlof
  0 siblings, 0 replies; 13+ 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

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

* Re: sound over USB
@ 2020-05-13 13:02     ` Ricard Wanderlof
  0 siblings, 0 replies; 13+ 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] 13+ messages in thread

* Re: sound over USB
  2020-05-12 16:43 ` Subhashini Rao Beerisetty
@ 2020-05-13 15:22   ` Sid Spry
  -1 siblings, 0 replies; 13+ messages in thread
From: Sid Spry @ 2020-05-13 15:22 UTC (permalink / raw)
  To: Subhashini Rao Beerisetty, kernelnewbies, alsa-devel, linux-usb

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.

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

* Re: sound over USB
@ 2020-05-13 15:22   ` Sid Spry
  0 siblings, 0 replies; 13+ messages in thread
From: Sid Spry @ 2020-05-13 15:22 UTC (permalink / raw)
  To: Subhashini Rao Beerisetty, kernelnewbies, alsa-devel, linux-usb

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.

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

* Re: sound over USB
  2020-05-13 15:22   ` Sid Spry
  (?)
@ 2020-05-14 13:42     ` Subhashini Rao Beerisetty
  -1 siblings, 0 replies; 13+ messages in thread
From: Subhashini Rao Beerisetty @ 2020-05-14 13:42 UTC (permalink / raw)
  To: Sid Spry; +Cc: kernelnewbies, alsa-devel, linux-usb

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?

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

* Re: sound over USB
@ 2020-05-14 13:42     ` Subhashini Rao Beerisetty
  0 siblings, 0 replies; 13+ 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?

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

* Re: sound over USB
@ 2020-05-14 13:42     ` Subhashini Rao Beerisetty
  0 siblings, 0 replies; 13+ 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] 13+ messages in thread

end of thread, other threads:[~2020-05-27 18:06 UTC | newest]

Thread overview: 13+ 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:43 ` Subhashini Rao Beerisetty
2020-05-12 16:53 ` Greg KH
2020-05-12 16:53   ` Greg KH
2020-05-12 16:53   ` Greg KH
2020-05-13 13:02   ` Ricard Wanderlof
2020-05-13 13:02     ` Ricard Wanderlof
2020-05-13 13:02     ` Ricard Wanderlof
2020-05-13 15:22 ` Sid Spry
2020-05-13 15:22   ` Sid Spry
2020-05-14 13:42   ` Subhashini Rao Beerisetty
2020-05-14 13:42     ` Subhashini Rao Beerisetty
2020-05-14 13:42     ` Subhashini Rao Beerisetty

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.