diff mbox

[v2,1/3] drm/i915/hda: Add audio component stub

Message ID s5hshxgu6r9.wl-tiwai@suse.de (mailing list archive)
State New, archived
Headers show

Commit Message

Takashi Iwai May 17, 2016, 1:57 p.m. UTC
On Tue, 17 May 2016 14:53:40 +0200,
Takashi Iwai wrote:
> 
> On Tue, 17 May 2016 14:39:26 +0200,
> Daniel Vetter wrote:
> > 
> > And if we _really_ want this to work at runtime too, then we need a
> > system-wide nomodeset option that snd-hda can look up and act accordingly.
> 
> Yes, this would be one option.

And I noticed that this can be easily added to patch 3, just like i915
driver does:


It's hackish, but should work practically enough...


Takashi

Comments

Daniel Vetter May 17, 2016, 1:59 p.m. UTC | #1
On Tue, May 17, 2016 at 03:57:30PM +0200, Takashi Iwai wrote:
> On Tue, 17 May 2016 14:53:40 +0200,
> Takashi Iwai wrote:
> > 
> > On Tue, 17 May 2016 14:39:26 +0200,
> > Daniel Vetter wrote:
> > > 
> > > And if we _really_ want this to work at runtime too, then we need a
> > > system-wide nomodeset option that snd-hda can look up and act accordingly.
> > 
> > Yes, this would be one option.
> 
> And I noticed that this can be easily added to patch 3, just like i915
> driver does:
> 
> diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
> index c9af022676c2..c48a014be7b4 100644
> --- a/sound/hda/hdac_i915.c
> +++ b/sound/hda/hdac_i915.c
> @@ -361,6 +361,11 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
>  	if (WARN_ON(hdac_acomp))
>  		return -EBUSY;
>  
> +#ifdef CONFIG_VGA_CONSOLE
> +	if (vgacon_text_force())
> +		return -ENODEV;
> +#endif

There's a dummy vgacon_text_force now, so you don't even need the #ifdef.
-Daniel

> +
>  	if (!i915_gfx_present())
>  		return -ENODEV;
>  
> 
> It's hackish, but should work practically enough...
> 
> 
> Takashi
Takashi Iwai May 17, 2016, 3:03 p.m. UTC | #2
On Tue, 17 May 2016 15:59:17 +0200,
Daniel Vetter wrote:
> 
> On Tue, May 17, 2016 at 03:57:30PM +0200, Takashi Iwai wrote:
> > On Tue, 17 May 2016 14:53:40 +0200,
> > Takashi Iwai wrote:
> > > 
> > > On Tue, 17 May 2016 14:39:26 +0200,
> > > Daniel Vetter wrote:
> > > > 
> > > > And if we _really_ want this to work at runtime too, then we need a
> > > > system-wide nomodeset option that snd-hda can look up and act accordingly.
> > > 
> > > Yes, this would be one option.
> > 
> > And I noticed that this can be easily added to patch 3, just like i915
> > driver does:
> > 
> > diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
> > index c9af022676c2..c48a014be7b4 100644
> > --- a/sound/hda/hdac_i915.c
> > +++ b/sound/hda/hdac_i915.c
> > @@ -361,6 +361,11 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
> >  	if (WARN_ON(hdac_acomp))
> >  		return -EBUSY;
> >  
> > +#ifdef CONFIG_VGA_CONSOLE
> > +	if (vgacon_text_force())
> > +		return -ENODEV;
> > +#endif
> 
> There's a dummy vgacon_text_force now, so you don't even need the #ifdef.

Good to know!


Takashi
diff mbox

Patch

diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
index c9af022676c2..c48a014be7b4 100644
--- a/sound/hda/hdac_i915.c
+++ b/sound/hda/hdac_i915.c
@@ -361,6 +361,11 @@  int snd_hdac_i915_init(struct hdac_bus *bus)
 	if (WARN_ON(hdac_acomp))
 		return -EBUSY;
 
+#ifdef CONFIG_VGA_CONSOLE
+	if (vgacon_text_force())
+		return -ENODEV;
+#endif
+
 	if (!i915_gfx_present())
 		return -ENODEV;