Message ID | 1557210791-20332-1-git-send-email-libin.yang@intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 939507f2779836919271ba0311723d1001d3993b |
Headers | show |
Series | ASoC: codec: hdac_hdmi: no checking monitor in hw_params | expand |
On Tue, 07 May 2019 08:33:11 +0200, libin.yang@intel.com wrote: > > From: Libin Yang <libin.yang@intel.com> > > Some userspace apps, like pulseaudio, may call open, hw_params, > prepare to judge whether the pcm is ready or not. Current hdac_hdmi > will return -ENODEV if monitor is not connected, which will cause > the apps believe the pcm is not ready. Actually PCM for hdmi is ready, > even the monitor is not connected. > > This patch removes the check of monitor presence in hw_params, just like > what the legacy HD-Audio driver does. > > Signed-off-by: Libin Yang <libin.yang@intel.com> LTGM, Reviewed-by: Takashi Iwai <tiwai@suse.de> thanks, Takashi
On 5/7/19 3:42 AM, Takashi Iwai wrote: > On Tue, 07 May 2019 08:33:11 +0200, > libin.yang@intel.com wrote: >> >> From: Libin Yang <libin.yang@intel.com> >> >> Some userspace apps, like pulseaudio, may call open, hw_params, >> prepare to judge whether the pcm is ready or not. Current hdac_hdmi >> will return -ENODEV if monitor is not connected, which will cause >> the apps believe the pcm is not ready. Actually PCM for hdmi is ready, >> even the monitor is not connected. >> >> This patch removes the check of monitor presence in hw_params, just like >> what the legacy HD-Audio driver does. >> >> Signed-off-by: Libin Yang <libin.yang@intel.com> > > LTGM, > Reviewed-by: Takashi Iwai <tiwai@suse.de> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> > > > thanks, > > Takashi > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > https://mailman.alsa-project.org/mailman/listinfo/alsa-devel >
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index 4de1fbf..660e058 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -455,24 +455,11 @@ static int hdac_hdmi_set_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hparams, struct snd_soc_dai *dai) { struct hdac_hdmi_priv *hdmi = snd_soc_dai_get_drvdata(dai); - struct hdac_device *hdev = hdmi->hdev; struct hdac_hdmi_dai_port_map *dai_map; - struct hdac_hdmi_port *port; struct hdac_hdmi_pcm *pcm; int format; dai_map = &hdmi->dai_map[dai->id]; - port = dai_map->port; - - if (!port) - return -ENODEV; - - if ((!port->eld.monitor_present) || (!port->eld.eld_valid)) { - dev_err(&hdev->dev, - "device is not configured for this pin:port%d:%d\n", - port->pin->nid, port->id); - return -ENODEV; - } format = snd_hdac_calc_stream_format(params_rate(hparams), params_channels(hparams), params_format(hparams),