All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Nicolas Pitre <nico@cam.org>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: [RFC] add bus driver model support for ad hoc AC97 drivers
Date: Thu, 27 Jan 2005 12:13:51 +0100	[thread overview]
Message-ID: <s5hfz0nruog.wl@alsa2.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.61.0501261051150.16341@localhost.localdomain>

At Wed, 26 Jan 2005 11:26:06 -0500 (EST),
Nicolas Pitre wrote:
> 
> 
> I would like to know what people think of the following patch.  It 
> allows for a codec on an AC97 bus to be shared with other drivers which 
> are completely unrelated to audio.  It registers a new bus type, and 
> whenever a codec instance is created then a device for it is also 
> registered with the driver model using that bus type.  This allows, for 
> example, to use the extra features of the UCB1400 like the touchscreen 
> interface and the additional GPIOs and ADCs available on that chip for 
> battery monitoring.  I have a working UCB1400 touchscreen driver here 
> that simply registers with the driver model happily working alongside 
> with audio features using this.

Looks fine to me.


> Index: linux-2.6/sound/pci/ac97/ac97_codec.c
> ===================================================================
> --- linux-2.6.orig/sound/pci/ac97/ac97_codec.c
> +++ linux-2.6/sound/pci/ac97/ac97_codec.c
(snip)
> @@ -2110,6 +2112,12 @@
>  		snd_ac97_free(ac97);
>  		return err;
>  	}
> +	ac97->dev.bus = &ac97_bus_type;
> +	ac97->dev.parent = ac97->bus->card->dev;
> +	ac97->dev.platform_data = ac97;
> +	strncpy(ac97->dev.bus_id, snd_ac97_get_short_name(ac97), BUS_ID_SIZE);

This may be problematic with names with '/' letters.
Either the name entry or snd_ac97_get_short_name() needs a fix.


Takashi


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl

  parent reply	other threads:[~2005-01-27 11:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-26 16:26 [RFC] add bus driver model support for ad hoc AC97 drivers Nicolas Pitre
2005-01-26 16:39 ` Liam Girdwood
2005-01-27 11:13 ` Takashi Iwai [this message]
2005-03-04 16:26 ` Liam Girdwood
2005-03-07 13:25   ` Takashi Iwai

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=s5hfz0nruog.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=nico@cam.org \
    /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.