Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Yang, Libin" <libin.yang@intel.com>
Cc: "libin.yang@linux.intel.com" <libin.yang@linux.intel.com>,
	"mengdong.lin@linux.intel.com" <mengdong.lin@linux.intel.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	David Henningsson <david.henningsson@canonical.com>
Subject: Re: [PATCH] ALSA - hda: hdmi flag to stop playback when monitor is disconnected
Date: Wed, 11 Nov 2015 15:41:44 +0100	[thread overview]
Message-ID: <s5hbnb0k387.wl-tiwai@suse.de> (raw)
In-Reply-To: <96A12704CE18D347B625EE2D4A099D19779E19@SHSMSX103.ccr.corp.intel.com>

On Wed, 11 Nov 2015 15:23:42 +0100,
Yang, Libin wrote:
> 
> 
> > -----Original Message-----
> > From: Takashi Iwai [mailto:tiwai@suse.de]
> > Sent: Wednesday, November 11, 2015 10:13 PM
> > To: libin.yang@linux.intel.com
> > Cc: David Henningsson; alsa-devel@alsa-project.org;
> > mengdong.lin@linux.intel.com; Yang, Libin
> > Subject: Re: [PATCH] ALSA - hda: hdmi flag to stop playback when
> > monitor is disconnected
> > 
> > On Wed, 11 Nov 2015 10:02:14 +0100,
> > Takashi Iwai wrote:
> > >
> > > On Wed, 11 Nov 2015 09:39:09 +0100,
> > > libin.yang@linux.intel.com wrote:
> > > >
> > > > From: Libin Yang <libin.yang@linux.intel.com>
> > > >
> > > > Add a flag that user can decide to stop HDMI/DP playback when
> > > > the corresponding monitor is disconnected and refuse to open PCM
> > > > if there is no monitor connected.
> > > >
> > > > Background:
> > > > When a monitor is disconnected and a new monitor is connected,
> > > > the parameters of the 2 monitors may be different. Audio driver
> > > > need handle this situation.
> > > >
> > > > Besides, stopping playback when monitor is disconnected will
> > > > help to save the power.
> > > >
> > > > Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
> > >
> > > Thanks.  Below are just nitpicking, so let's test this patch at first,
> > > especially to see whether it has any significant influence on PA, then
> > > respin with the fixes.
> > >
> > > David, care to check in your side, too?
> > 
> > So I tested this with PA 7.1, and it failed, unfortunately.
> > In short:
> > - PA needs the PCM access at probe.  If it gets an error, the device
> >   will be never enumerated again
> 
> Thanks for test.
> 
> If so, should we re-write the hdmi_pcm_open() and 
> generic_hdmi_playback_pcm_prepare() function to make
> the probe works? Or not support dynamic pcm assignment?
> 
> > - PA removes the device when it's disconnected.  The PCM stop with
> >   DISCONNECT state leads to the device disappearance.
> 
> If we can't use DISCONNECT, what else can we use? Or we can't
> stop PCM when monitor is disconnected?

One obvious options is: we don't care about it.  Maybe care it only
when really needed, e.g. return an error only in prepare and cleanup,
but not in open.


Takashi

  reply	other threads:[~2015-11-11 14:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11  8:39 [PATCH] ALSA - hda: hdmi flag to stop playback when monitor is disconnected libin.yang
2015-11-11  9:02 ` Takashi Iwai
2015-11-11 14:12   ` Takashi Iwai
2015-11-11 14:23     ` Yang, Libin
2015-11-11 14:41       ` Takashi Iwai [this message]
2015-11-11 14:53         ` Yang, Libin
2015-11-11 14:58           ` Takashi Iwai
2015-11-11 15:21             ` Yang, Libin
2015-11-12  7:02       ` David Henningsson
2015-11-12  7:26         ` Libin Yang
2015-11-12  7:32           ` David Henningsson
2015-11-12  7:38             ` Libin Yang
2015-11-11 14:43     ` Yang, Libin
2015-11-11 15:00       ` Takashi Iwai
2015-11-11 15:22         ` Yang, Libin

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=s5hbnb0k387.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=david.henningsson@canonical.com \
    --cc=libin.yang@intel.com \
    --cc=libin.yang@linux.intel.com \
    --cc=mengdong.lin@linux.intel.com \
    /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