All of lore.kernel.org
 help / color / mirror / Atom feed
* [Q] Writing an alsa module for usb audio & video capture device
@ 2012-06-04 21:50 Ezequiel Garcia
  2012-06-06 16:40 ` Ezequiel Garcia
  0 siblings, 1 reply; 5+ messages in thread
From: Ezequiel Garcia @ 2012-06-04 21:50 UTC (permalink / raw)
  To: alsa-devel

Hi everyone,

I'm writing a driver for stk1160 usb bridge (audio & video capture device).
The video part is almost done [1] and now I've started the alsa part.

As the driver replaces an in-tree staging driver I could just grab the alsa part
from the original driver (called easycap), or look into em28xx sources.

But as I want to learn a thing or two in this life, I've decided to
take a look at sound drivers first.
Currently I'm reading through sound/usb/6fire driver (picked randomly).

I would like to know: do you have any suggestions and/or hints in
order to write a *nice* driver?
What driver would you consider as being a *correct* usb sound capture
implementation?

[1] http://patchwork.linuxtv.org/patch/11577/

Thanks,
Ezequiel.

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

* Re: [Q] Writing an alsa module for usb audio & video capture device
  2012-06-04 21:50 [Q] Writing an alsa module for usb audio & video capture device Ezequiel Garcia
@ 2012-06-06 16:40 ` Ezequiel Garcia
  2012-06-06 17:26   ` Clemens Ladisch
  0 siblings, 1 reply; 5+ messages in thread
From: Ezequiel Garcia @ 2012-06-06 16:40 UTC (permalink / raw)
  To: alsa-devel

Hi again,

On Mon, Jun 4, 2012 at 6:50 PM, Ezequiel Garcia <elezegarcia@gmail.com> wrote:
> Hi everyone,
>
> I'm writing a driver for stk1160 usb bridge (audio & video capture device).
> The video part is almost done [1] and now I've started the alsa part.
>
> As the driver replaces an in-tree staging driver I could just grab the alsa part
> from the original driver (called easycap), or look into em28xx sources.
>
[snipped myself]

I also would like to know (if anyone is reading this):

1. Why do I need to write another module for my device? Is it not
possible to make it work
with snd-usb-audio?
2. The device uses ac97 chip, could I use some ac97 common code
instead of rewriting it myself?

Currently, v4l drivers that must support alsa rewrites a lot of stuff.
I'm not sure this is the *right thing*.

Thanks,
Ezequiel.

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

* Re: [Q] Writing an alsa module for usb audio & video capture device
  2012-06-06 16:40 ` Ezequiel Garcia
@ 2012-06-06 17:26   ` Clemens Ladisch
  2012-06-07 18:29     ` Ezequiel Garcia
  0 siblings, 1 reply; 5+ messages in thread
From: Clemens Ladisch @ 2012-06-06 17:26 UTC (permalink / raw)
  To: Ezequiel Garcia; +Cc: alsa-devel

Ezequiel Garcia wrote:
> 1. Why do I need to write another module for my device? Is it not
> possible to make it work
> with snd-usb-audio?

Of course it is possible; just make it USB Audio class compliant.

> 2. The device uses ac97 chip, could I use some ac97 common code
> instead of rewriting it myself?

The AC'97 code is for managing codecs on an AC'97 bus, but the bus
inside a USB device is not directly accessible to code on the host.


Regards,
Clemens

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

* Re: [Q] Writing an alsa module for usb audio & video capture device
  2012-06-06 17:26   ` Clemens Ladisch
@ 2012-06-07 18:29     ` Ezequiel Garcia
  2012-06-07 19:21       ` Clemens Ladisch
  0 siblings, 1 reply; 5+ messages in thread
From: Ezequiel Garcia @ 2012-06-07 18:29 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel

Hi Clemens,

On Wed, Jun 6, 2012 at 2:26 PM, Clemens Ladisch <clemens@ladisch.de> wrote:
> Ezequiel Garcia wrote:
>> 1. Why do I need to write another module for my device? Is it not
>> possible to make it work
>> with snd-usb-audio?
>
> Of course it is possible; just make it USB Audio class compliant.

What do you mean by that? What's exactly the scope of supported
devices by snd-usb-audio?

>
>> 2. The device uses ac97 chip, could I use some ac97 common code
>> instead of rewriting it myself?
>
> The AC'97 code is for managing codecs on an AC'97 bus, but the bus
> inside a USB device is not directly accessible to code on the host.
>
Understood.

Thank you very much!
Ezequiel.

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

* Re: [Q] Writing an alsa module for usb audio & video capture device
  2012-06-07 18:29     ` Ezequiel Garcia
@ 2012-06-07 19:21       ` Clemens Ladisch
  0 siblings, 0 replies; 5+ messages in thread
From: Clemens Ladisch @ 2012-06-07 19:21 UTC (permalink / raw)
  To: Ezequiel Garcia; +Cc: alsa-devel

Ezequiel Garcia wrote:
> On Wed, Jun 6, 2012 at 2:26 PM, Clemens Ladisch <clemens@ladisch.de> wrote:
>> make it USB Audio class compliant.
>
> What do you mean by that?

Implement the descriptors and class-specific requests required by one of
the Audio Class specifications:
http://www.usb.org/developers/devclass_docs#approved

> What's exactly the scope of supported devices by snd-usb-audio?

Pretty much everything in Audio Class 1.0 and 2.0 (some clock-related
parts of v2 are yet missing).


Regards,
Clemens

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

end of thread, other threads:[~2012-06-07 19:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-04 21:50 [Q] Writing an alsa module for usb audio & video capture device Ezequiel Garcia
2012-06-06 16:40 ` Ezequiel Garcia
2012-06-06 17:26   ` Clemens Ladisch
2012-06-07 18:29     ` Ezequiel Garcia
2012-06-07 19:21       ` Clemens Ladisch

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.