From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH 2/2] ALSA: hda - hdmi: Set infoframe and channel mapping even without sink Date: Mon, 05 May 2014 16:34:49 +0200 Message-ID: References: <1399246724-16611-1-git-send-email-anssi.hannula@iki.fi> <1399246724-16611-2-git-send-email-anssi.hannula@iki.fi> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 97F672608EA for ; Mon, 5 May 2014 16:34:51 +0200 (CEST) In-Reply-To: <1399246724-16611-2-git-send-email-anssi.hannula@iki.fi> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Anssi Hannula Cc: Stephan Raue , alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Mon, 5 May 2014 02:38:44 +0300, Anssi Hannula wrote: > > Currently infoframe contents and channel mapping are only set when a > sink (monitor) is present. > > However, this does not make much sense, since > 1) We can make a very reasonable guess on CA after 18e391862c ("ALSA: > hda - hdmi: Fallback to ALSA allocation when selecting CA") or by > relying on a previously valid ELD (or we may be using a > user-specified channel map). > 2) Not setting infoframe contents and channel count simply means they > are left at a possibly incorrect state - playback is still allowed > to proceed (with missing or wrongly mapped channels). > > Reasons for monitor_present being 0 include disconnected cable, video > driver issues, or codec not being spec-compliant. Note that in > actual disconnected-cable case it should not matter if these settings > are wrong as they will be re-set after jack detection, though. > > Change the behavior to allow the infoframe contents and the channel > mapping to be set even without a sink/monitor, either based on the > previous valid ELD contents, if any, or based on sensible defaults > (standard channel layouts or provided custom map, sink type HDMI). > > Signed-off-by: Anssi Hannula > Tested-by: Stephan Raue > --- > > This simply removes the monitor_present check, which is probably more > trouble than it is worth, as it may trip obscure setups even though we > can tolerate !monitor_present and !eld in 99%+ of all cases by using > defaults, nowadays post-18e391862c anyway. > Downside is that missing monitor_present may not be noticed by the user > as ~everything continues to work. Is this considered as a "fix" for 3.15 kernel? If so, I find it a bit distracting to queue the previous patch for stable while we're removing the whole things here later. If this is intended for testing for 3.16 kernel, I'm fine to take as is. thanks, Takashi > > > sound/pci/hda/patch_hdmi.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c > index 1edbb9c47c2d..016f785cdf45 100644 > --- a/sound/pci/hda/patch_hdmi.c > +++ b/sound/pci/hda/patch_hdmi.c > @@ -1127,10 +1127,6 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, > AMP_OUT_UNMUTE); > > eld = &per_pin->sink_eld; > - if (!eld->monitor_present) { > - hdmi_set_channel_count(codec, per_pin->cvt_nid, channels); > - return; > - } > > if (!non_pcm && per_pin->chmap_set) > ca = hdmi_manual_channel_allocation(channels, per_pin->chmap); > -- > 1.8.4.5 >