Re: [PATCH 2/5] [RFC]intel_hdmi_audio: interface module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > > > + * had_hot_plug - to create sound card instance for HDMI audio
> > playabck
> > > > + *
> > > > + *
> > > > + * This function is called when the hdmi cable is plugged in. This
> > function
> > > > + * creates and registers the sound card with ALSA
> > > > + */
> > > > +static int had_hot_plug(void)
> > > > +{
> > >
> > > It would seem more natural for the HDMI device to be created and
> > > instatiated via the normal Linux device model - when a HDMI
> > connection
> > > is detected the thing doing the detection creates and registers a new
> > > device of some kind which the driver core then binds to a separate
> > > driver.
> >
> > Yeah, the driver structure here is somehow wacky, although it's not
> > to hard to trace.
> >
> >
> 
> Agree, we will work on this and revert back to you.
> 

We are planning to follow the USB audio driver model.  During _init
audio driver callbacks will be registered with display driver. Whenever
device is hot plugged, .probe will be invoked and sound card is created.
During un-plug, .disconnect will be invoked and sound card is removed.
Similarly .suspend and .resume will be called when the display device
getting suspended and resumed. Please provide your suggestions on this
driver model.

static struct hdmi_driver hdmi_audio_driver = {
    .probe =    hdmi_audio_probe,
    .disconnect =   hdmi_audio_disconnect,
    .suspend =  hdmi_audio_suspend,
    .resume =   hdmi_audio_resume,
 };
 
 static int __init alsa_card_intelhad_init(void)
 {
 	return hdmi_register(&hdmi_audio_driver);
 }

Thanks,
Ramesh & Sailaja
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux