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: "Lin, Mengdong" <mengdong.lin@intel.com>,
	"libin.yang@linux.intel.com" <libin.yang@linux.intel.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [PATCH 3/4] ALSA: hda - hdmi jack created based on pcm
Date: Fri, 08 Jan 2016 08:43:58 +0100	[thread overview]
Message-ID: <s5hd1tc8qip.wl-tiwai@suse.de> (raw)
In-Reply-To: <96A12704CE18D347B625EE2D4A099D190464D1BC@SHSMSX103.ccr.corp.intel.com>

On Fri, 08 Jan 2016 04:15:03 +0100,
Yang, Libin wrote:
> > > @@ -2626,18 +2659,23 @@ static void hdmi_array_free(struct
> > hdmi_spec *spec)
> > >  static void generic_hdmi_free(struct hda_codec *codec)
> > >  {
> > >  	struct hdmi_spec *spec = codec->spec;
> > > -	int pin_idx;
> > > +	int pin_idx, pcm_idx;
> > >
> > >  	if (codec_has_acomp(codec))
> > >  		snd_hdac_i915_register_notifier(NULL);
> > >
> > >  	for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) {
> > >  		struct hdmi_spec_per_pin *per_pin = get_pin(spec,
> > pin_idx);
> > > -
> > >  		cancel_delayed_work_sync(&per_pin->work);
> > >  		eld_proc_free(per_pin);
> > > -		if (per_pin->acomp_jack)
> > > -			snd_device_free(codec->card, per_pin-
> > >acomp_jack);
> > > +	}
> > > +
> > > +	for (pcm_idx = 0; pcm_idx < spec->pcm_used; pcm_idx++) {
> > > +		if (spec->dyn_pcm_assign)
> > > +			snd_device_free(codec->card,
> > > +					spec->pcm_rec[pcm_idx].jack);
> > > +		else
> > > +			spec->pcm_rec[pcm_idx].jack = NULL;
> > 
> > Check whether spec->pcm_rec[pcm_idx].jack is NULL beforehand.
> > 
> 
> Do you mean:
> if (spec->pcm_rec[pcm_idx].jack)
>     spec->pcm_rec[pcm_idx].jack = NULL;

Not only that.  Calling snd_device_free() with NULL isn't allowed.


Takashi

  reply	other threads:[~2016-01-08  7:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-31  1:22 [PATCH 0/4] ALSA: hda - hdmi jack support for dynamic pcm assignment libin.yang
2015-12-31  1:22 ` [PATCH 1/4] ALSA: Add documentation about HD-audio DP MST libin.yang
2015-12-31  1:22 ` [PATCH 2/4] ALSA: hda - add hdmi_pcm to manage hdmi pcm related features libin.yang
2016-01-07 13:59   ` Takashi Iwai
2016-01-08  2:48     ` Yang, Libin
2015-12-31  1:22 ` [PATCH 3/4] ALSA: hda - hdmi jack created based on pcm libin.yang
2016-01-07 14:13   ` Takashi Iwai
2016-01-08  3:15     ` Yang, Libin
2016-01-08  7:43       ` Takashi Iwai [this message]
2016-01-08  7:52         ` Yang, Libin
2016-01-08  7:54           ` Takashi Iwai
2016-01-08  7:57             ` Yang, Libin
2015-12-31  1:22 ` [PATCH 4/4] ALSA: hda - hdmi monitor hotplug support for dynamic pcm assignment libin.yang
2016-01-07 14:18   ` Takashi Iwai
2016-01-08  5:25     ` Yang, Libin
2016-01-08  7:45       ` Takashi Iwai
2016-01-08  7:53         ` Yang, Libin
2016-01-06  9:18 ` [PATCH 0/4] ALSA: hda - hdmi jack " Takashi Iwai
2016-01-07  1:41   ` Yang, Libin
2016-01-07 10:31     ` Takashi Iwai
2016-01-08  2:47       ` 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=s5hd1tc8qip.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=libin.yang@intel.com \
    --cc=libin.yang@linux.intel.com \
    --cc=mengdong.lin@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