[PATCH 2/2] vga_switcheroo: Add the support for audio clients

Takashi Iwai tiwai at suse.de
Thu May 10 12:26:42 PDT 2012


At Thu, 10 May 2012 20:05:25 +0100,
Dave Airlie wrote:
> 
> On Thu, May 10, 2012 at 7:42 PM, Takashi Iwai <tiwai at suse.de> wrote:
> > 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 at 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));
> > };
> 
> Yeah I suppose we should go and just do that now, it kinda grew a bit
> much previously.
> 
> If you want to do patches for it I'd be happy to take them.

OK, I'll work on it tomorrow.


Takashi


More information about the dri-devel mailing list