Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] alsa: hda_codec: fix number of devices query on hotplug
@ 2015-06-09  3:39 airlied
  2015-06-09  5:36 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: airlied @ 2015-06-09  3:39 UTC (permalink / raw)
  To: alsa-devel; +Cc: Dave Airlie

From: Dave Airlie <airlied@redhat.com>

The new regmap code seems to cache this, which isn't helpful
for the hotplug dock situation where this gets updated.

Use the uncached query for this.

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 sound/pci/hda/hda_codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index b49feff..b778221 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -436,7 +436,7 @@ static unsigned int get_num_devices(struct hda_codec *codec, hda_nid_t nid)
 	    get_wcaps_type(wcaps) != AC_WID_PIN)
 		return 0;
 
-	parm = snd_hda_param_read(codec, nid, AC_PAR_DEVLIST_LEN);
+	parm = snd_hdac_read_parm_uncached(&codec->core, nid, AC_PAR_DEVLIST_LEN);
 	if (parm == -1 && codec->bus->rirb_error)
 		parm = 0;
 	return parm & AC_DEV_LIST_LEN_MASK;
-- 
2.4.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] alsa: hda_codec: fix number of devices query on hotplug
  2015-06-09  3:39 [PATCH] alsa: hda_codec: fix number of devices query on hotplug airlied
@ 2015-06-09  5:36 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2015-06-09  5:36 UTC (permalink / raw)
  To: airlied; +Cc: Dave Airlie, alsa-devel

At Tue,  9 Jun 2015 13:39:31 +1000,
airlied@gmail.com wrote:
> 
> From: Dave Airlie <airlied@redhat.com>
> 
> The new regmap code seems to cache this, which isn't helpful
> for the hotplug dock situation where this gets updated.
> 
> Use the uncached query for this.
> 
> Signed-off-by: Dave Airlie <airlied@redhat.com>

Applied, thanks!


Takashi

> ---
>  sound/pci/hda/hda_codec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
> index b49feff..b778221 100644
> --- a/sound/pci/hda/hda_codec.c
> +++ b/sound/pci/hda/hda_codec.c
> @@ -436,7 +436,7 @@ static unsigned int get_num_devices(struct hda_codec *codec, hda_nid_t nid)
>  	    get_wcaps_type(wcaps) != AC_WID_PIN)
>  		return 0;
>  
> -	parm = snd_hda_param_read(codec, nid, AC_PAR_DEVLIST_LEN);
> +	parm = snd_hdac_read_parm_uncached(&codec->core, nid, AC_PAR_DEVLIST_LEN);
>  	if (parm == -1 && codec->bus->rirb_error)
>  		parm = 0;
>  	return parm & AC_DEV_LIST_LEN_MASK;
> -- 
> 2.4.1
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-09  5:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-09  3:39 [PATCH] alsa: hda_codec: fix number of devices query on hotplug airlied
2015-06-09  5:36 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox