Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rask Ingemann Lambertsen <rask@sygehus.dk>
To: Rene Herman <rene.herman@gmail.com>
Cc: Adam Belay <ambx1@neo.rr.com>, alsa-devel@lists.sourceforge.net
Subject: Re: [RFC][RFT] Adding support for Jazz16 based sound cards
Date: Mon, 19 Mar 2007 23:46:07 +0100	[thread overview]
Message-ID: <20070319224607.GA7889@sygehus.dk> (raw)
In-Reply-To: <45FDDA0F.7050503@gmail.com>

On Mon, Mar 19, 2007 at 01:32:15AM +0100, Rene Herman wrote:
> 
> I just now tested this on a standalone Jazz16 and it seems to be working 
> fine for me. I once had ogg123 segfault on me at the end of playback but 
> was unsuccesful in reproducing -- may have been a fluke.

   Thanks. I'll try out ogg123.

> As to the comments...
> 
> The changes to the SB code to support the Jazz16 I ofcourse agree with. 
> Supporting a new card is great. I am however not a huge fan of the new 
> PnP protocol. It's cute, but I feel it's a little over-engineered and 
> could just as well live directly in snd-jazz16.

   See below.

> This setup also shares that same problem with the BIOS generally not 
> having reserved/routed the resources -- on a general PCI/ISA system the 
> user needs to go into the BIOS setup and reserve the resources the card 
> is (or will be, in this case) set to. So now the user really needs to 
> know what resources are going to be assigned, destroying the plug and 
> play idea...

   Not really. A standards compliant PnPBIOS set up with "PnP aware OS =
YES" will use only enough resources to boot the system, which should leave
enough irqs and dmas for the Linux PnP layer to do its work.

   I think there are three good reasons to use the PnP layer:

   1) The PnP layer informs the PCI layer of irqs to try to avoid - please
see pnp_register_irq_resource() in drivers/pnp/resource.c.
   2) The PnP layer knows which resources are used by active devices, even
if they have not been allocated using e.g. request_region(). This
happens in practice. For example:

$ cat /sys/bus/pnp/devices/01\:02.00/resources
state = active
io 0x2a0-0x2af
io 0x390-0x393
io 0x500-0x50f
irq 5
dma 0
dma 1
$ cat /proc/ioports
[...]
0200-0200 : ns558-pnp
0201-0201 : ns558-pnp
0208-020f : ns558-pnp
0213-0213 : ISAPnP
0280-028f : ES18xx
0356-0356 : ide2
0360-0361 : MPU401 UART
0376-0376 : 0000:00:07.1
  0376-0376 : ide1
0390-0391 : OPL2/3 (left)
0392-0393 : OPL2/3 (right)
03c0-03df : vga+
03e8-03ef : serial
03f6-03f6 : 0000:00:07.1
  03f6-03f6 : ide0
03f8-03ff : serial
0500-050f : AD1816A
0800-0807 : ES18xx - CTRL
[...]

Notice that 0x2a0-0x2af is missing from /proc/ioports. The PnP layer will
avoid using that port range because it knows a device is using it.
   3) Knowing which resources a card can utilize, the PnP layer can try to
stay away from those resources when configuring other cards. The PnP layer
doesn't do that yet in a stock kernel, but I've patched it to do so. I'll
try to get those patches into the kernel.

   An advantage of autoprobing in a PnP protocol driver (as opposed to doing
so in a sound card driver) is that it happens before any file systems have
been mounted, so if the autoprobe happens to find one of those #%!$@ NE2000
cards and lock up the system, it won't corrupt your disks.

-- 
Rask Ingemann Lambertsen

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

  parent reply	other threads:[~2007-03-19 22:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-11 23:24 [RFC][RFT] Adding support for Jazz16 based sound cards Rask Ingemann Lambertsen
2007-03-12 11:28 ` Takashi Iwai
2007-03-12 23:23   ` Rask Ingemann Lambertsen
2007-03-13  9:34     ` Takashi Iwai
2007-03-19  0:32 ` Rene Herman
2007-03-19 20:52   ` Rene Herman
2007-03-19 21:06   ` Rene Herman
2007-03-19 21:22     ` Rene Herman
2007-03-19 21:40       ` Rene Herman
2007-03-20 12:12         ` Takashi Iwai
2007-03-20 12:28           ` Broken moderation Takashi Iwai
2007-03-20 12:35             ` Takashi Iwai
2007-03-20 12:57               ` Rene Herman
2007-03-20 14:58                 ` RESUBSCRIBE - New alsa-devel mailing list Jaroslav Kysela
2007-03-20 15:09                   ` Benoit Fouet
2007-03-20 15:38                     ` Jaroslav Kysela
2007-03-20 15:21                   ` Tobin Davis
2007-03-20 15:35                     ` Ingo Müller
2007-03-20 16:18                   ` Rene Herman
2007-03-20 17:25                     ` Jaroslav Kysela
2007-03-21  0:49                   ` [Alsa-devel] " Ed Wright
2007-03-21  9:10                     ` Rene Herman
2007-03-19 22:46   ` Rask Ingemann Lambertsen [this message]
2007-03-20 21:23     ` [Alsa-devel] [RFC][RFT] Adding support for Jazz16 based sound cards Rene Herman

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=20070319224607.GA7889@sygehus.dk \
    --to=rask@sygehus.dk \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=ambx1@neo.rr.com \
    --cc=rene.herman@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox