alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] [RESEND] snd-ac97-codec: Use complete ID when the codec is not known
@ 2013-09-27 18:28 Ondrej Zary
  2013-09-30  9:08 ` [alsa-devel] " Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Ondrej Zary @ 2013-09-27 18:28 UTC (permalink / raw)
  To: alsa-devel; +Cc: linux-kernel

Currently, if the codec ID is not known, the last byte of the ID is used as name.
It's not helpful at all, use full codec ID instead.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
---
 sound/pci/ac97/ac97_codec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index bf578ba2..30a40a8 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -1830,7 +1830,7 @@ void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, int m
 				pid->patch(ac97);
 		}
 	} else
-		sprintf(name + strlen(name), " id %x", id & 0xff);
+		sprintf(name + strlen(name), " id %x", id);
 }
 
 /**
-- 
Ondrej Zary

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

* Re: [alsa-devel] [PATCH 2/2] [RESEND] snd-ac97-codec: Use complete ID when the codec is not known
  2013-09-27 18:28 [PATCH 2/2] [RESEND] snd-ac97-codec: Use complete ID when the codec is not known Ondrej Zary
@ 2013-09-30  9:08 ` Takashi Iwai
  2013-09-30 18:42   ` Ondrej Zary
  0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2013-09-30  9:08 UTC (permalink / raw)
  To: Ondrej Zary; +Cc: alsa-devel, linux-kernel

At Fri, 27 Sep 2013 20:28:03 +0200,
Ondrej Zary wrote:
> 
> Currently, if the codec ID is not known, the last byte of the ID is used as name.
> It's not helpful at all, use full codec ID instead.

The full bytes are already shown at the beginning, no?
It's masked because the upper three bytes are shown in printable form,
and the last byte is usually a model number.


Takashi

> 
> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> ---
>  sound/pci/ac97/ac97_codec.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
> index bf578ba2..30a40a8 100644
> --- a/sound/pci/ac97/ac97_codec.c
> +++ b/sound/pci/ac97/ac97_codec.c
> @@ -1830,7 +1830,7 @@ void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, int m
>  				pid->patch(ac97);
>  		}
>  	} else
> -		sprintf(name + strlen(name), " id %x", id & 0xff);
> +		sprintf(name + strlen(name), " id %x", id);
>  }
>  
>  /**
> -- 
> Ondrej Zary
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

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

* Re: [alsa-devel] [PATCH 2/2] [RESEND] snd-ac97-codec: Use complete ID when the codec is not known
  2013-09-30  9:08 ` [alsa-devel] " Takashi Iwai
@ 2013-09-30 18:42   ` Ondrej Zary
  0 siblings, 0 replies; 3+ messages in thread
From: Ondrej Zary @ 2013-09-30 18:42 UTC (permalink / raw)
  To: alsa-devel; +Cc: Takashi Iwai, linux-kernel

On Monday 30 September 2013 11:08:50 Takashi Iwai wrote:
> At Fri, 27 Sep 2013 20:28:03 +0200,
>
> Ondrej Zary wrote:
> > Currently, if the codec ID is not known, the last byte of the ID is used
> > as name. It's not helpful at all, use full codec ID instead.
>
> The full bytes are already shown at the beginning, no?
> It's masked because the upper three bytes are shown in printable form,
> and the last byte is usually a model number.

Thanks, I see now. So this patch is not needed.

>
> Takashi
>
> > Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> > ---
> >  sound/pci/ac97/ac97_codec.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
> > index bf578ba2..30a40a8 100644
> > --- a/sound/pci/ac97/ac97_codec.c
> > +++ b/sound/pci/ac97/ac97_codec.c
> > @@ -1830,7 +1830,7 @@ void snd_ac97_get_name(struct snd_ac97 *ac97,
> > unsigned int id, char *name, int m pid->patch(ac97);
> >  		}
> >  	} else
> > -		sprintf(name + strlen(name), " id %x", id & 0xff);
> > +		sprintf(name + strlen(name), " id %x", id);
> >  }
> >
> >  /**
> > --
> > Ondrej Zary
> > _______________________________________________
> > Alsa-devel mailing list
> > Alsa-devel@alsa-project.org
> > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


-- 
Ondrej Zary

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

end of thread, other threads:[~2013-09-30 18:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-27 18:28 [PATCH 2/2] [RESEND] snd-ac97-codec: Use complete ID when the codec is not known Ondrej Zary
2013-09-30  9:08 ` [alsa-devel] " Takashi Iwai
2013-09-30 18:42   ` Ondrej Zary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).