From: Eliot Blennerhassett <linux@audioscience.com>
To: alsa-devel@alsa-project.org
Cc: Michael Bourgeous <sts.nitrogen@gmail.com>
Subject: Re: Writing a new sound driver
Date: Sun, 12 Aug 2007 15:02:09 +1200 [thread overview]
Message-ID: <200708121502.09106.linux@audioscience.com> (raw)
In-Reply-To: <8e4fc8270708111546k328a0575h9e362ee01a2917ec@mail.gmail.com>
Hi Mike,
On Sunday 12 August 2007 10:46:07 Michael Bourgeous wrote:
> I am the developer of the work-in-progress MyHD/TL880 Linux driver.
> The TL880 chip can act as a sound input and output device, but it
> doesn't seem to support DMA for sound. Is it possible to write a
> sound driver for ALSA that uses a polling mechanism?
Yes.
Read about the copy and silence callbacks here:
http://www-old.alsa-project.org/~iwai/writing-an-alsa-driver/x1409.htm
Get the alsa-driver source code and grep -r "\.copy" to find drivers that use
this method. E.g. RME, asihpi
Does it support interrupts?
If so see
http://www-old.alsa-project.org/~iwai/writing-an-alsa-driver/x773.htm
otherwise you need to use a timer to poll the transfer status and call
snd_pcm_period_elapsed appropriately similar to the High-frequent timer
interrupts section of the above reference.
> Also, how would
> I integrate this driver with my core driver for accessing the TL880?
> The chip's features span four separate kernel subsystems: v4l, dvb,
> sound, and fb.
What are dependencies if any between these functions on the chip?
> I guess my main question is this: what is the bare minimum of code and
> hardware functionality required to write a sound driver?
The "dummy" driver provides a starting point to which you can add your own
functionality.
For alsa driver code implementing mixer controls is almost completely
independent of audio I/O (apart from very top level where they belong to the
same card object), so you can leave it out to start with, unless you need to
set some controls to get audio out!
--
Eliot
next prev parent reply other threads:[~2007-08-12 3:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-11 22:46 Writing a new sound driver Michael Bourgeous
2007-08-12 3:02 ` Eliot Blennerhassett [this message]
2007-08-12 20:44 ` Alsa principles LCID Fire
2007-08-13 7:03 ` Clemens Ladisch
2007-08-14 16:30 ` Takashi Iwai
2007-08-15 22:30 ` Writing a new sound driver Michael Bourgeous
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200708121502.09106.linux@audioscience.com \
--to=linux@audioscience.com \
--cc=alsa-devel@alsa-project.org \
--cc=sts.nitrogen@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.