dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] vga_switcheroo: Add the support for audio clients
Date: Thu, 10 May 2012 20:42:26 +0200	[thread overview]
Message-ID: <s5hmx5fvpwt.wl%tiwai@suse.de> (raw)
In-Reply-To: <s5hsjf8xnxq.wl%tiwai@suse.de>

At Thu, 10 May 2012 13:42:09 +0200,
Takashi Iwai wrote:
> 
> At Thu, 10 May 2012 12:20:05 +0100,
> Alan Cox wrote:
> > 
> > On Thu, 10 May 2012 09:10:16 +0200
> > Takashi Iwai <tiwai@suse.de> wrote:
> > 
> > > Add the support for audio clients to VGA-switcheroo for handling the
> > > HDMI audio controller together with VGA switching.  The id of the
> > > audio controller should be given explicity at registration time unlike
> > > the video controller.
> > 
> > It would I think be a lot cleaner and more future proof to pass a 
> > 
> > struct hdmi_audio_switch_ops
> > 
> > or some similar named object with an array of function pointers ?
> 
> That would be a good option, indeed.
> 
> In my patch series, I just didn't want to break the existing API,
> so I kept the current style.

Dave, do you prefer the way with an ops struct as Alan suggested?

For example, I can make like

struct vga_switcheroo_client_ops {
       void (*set_gpu_state)(struct pci_dev *dev, enum vga_switcheroo_state),
       void (*reprobe)(struct pci_dev *dev),
       bool (*can_switch)(struct pci_dev *dev));
};

and pass the pointer to vga_switcher_register_client() and
vga_switcher_register_audio_client().

If it's preferred, I'll work on it and resend you a pull request later.

BTW, I modified topic/vga-switcheroo branch of sound git tree again.
Now it contains only two commits I posted here.  The rest commits for
HD-audio are found in topic/hda-switcheroo branch.


thanks,

Takashi

  reply	other threads:[~2012-05-10 18:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10  7:08 [PATCH 0/2] Audio client support for VGA-switcheroo Takashi Iwai
2012-05-10  7:09 ` [PATCH 1/2] vga_switcheroo: Refactor using linked list Takashi Iwai
2012-05-10  7:10 ` [PATCH 2/2] vga_switcheroo: Add the support for audio clients Takashi Iwai
2012-05-10  8:23   ` Paul Menzel
2012-05-10  8:44     ` Takashi Iwai
2012-05-10 10:40   ` Dave Airlie
2012-05-10 11:43     ` Takashi Iwai
2012-05-10 11:20   ` Alan Cox
2012-05-10 11:42     ` Takashi Iwai
2012-05-10 18:42       ` Takashi Iwai [this message]
2012-05-10 19:05         ` Dave Airlie
2012-05-10 19:26           ` Takashi Iwai
2012-05-10  7:18 ` [PATCH 0/2] Audio client support for VGA-switcheroo 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=s5hmx5fvpwt.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox