diff mbox

[1/2] ALSA: asound.h - use SNDRV_CTL_ELEM_ID_NAME_MAXLEN

Message ID 1429291413-30668-1-git-send-email-vinod.koul@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vinod Koul April 17, 2015, 5:23 p.m. UTC
we have defined SNDRV_CTL_ELEM_ID_NAME_MAXLEN as size of name array so use
this define instead of numeric value

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 include/uapi/sound/asound.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Takashi Iwai April 18, 2015, 7:02 a.m. UTC | #1
At Fri, 17 Apr 2015 22:53:32 +0530,
Vinod Koul wrote:
> 
> we have defined SNDRV_CTL_ELEM_ID_NAME_MAXLEN as size of name array so use
> this define instead of numeric value
> 
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>

Applied, thanks.


Takashi

> ---
>  include/uapi/sound/asound.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
> index 46145a5277fe..a45be6bdcf5b 100644
> --- a/include/uapi/sound/asound.h
> +++ b/include/uapi/sound/asound.h
> @@ -864,7 +864,7 @@ struct snd_ctl_elem_id {
>  	snd_ctl_elem_iface_t iface;	/* interface identifier */
>  	unsigned int device;		/* device/client number */
>  	unsigned int subdevice;		/* subdevice (substream) number */
> -	unsigned char name[44];		/* ASCII name of item */
> +	unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];		/* ASCII name of item */
>  	unsigned int index;		/* index of item */
>  };
>  
> -- 
> 1.7.9.5
>
Takashi Sakamoto April 19, 2015, 4:55 a.m. UTC | #2
On Apr 18 2015 02:23, Vinod Koul wrote:
> we have defined SNDRV_CTL_ELEM_ID_NAME_MAXLEN as size of name array so use
> this define instead of numeric value
> 
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> ---
>  include/uapi/sound/asound.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
> index 46145a5277fe..a45be6bdcf5b 100644
> --- a/include/uapi/sound/asound.h
> +++ b/include/uapi/sound/asound.h
> @@ -864,7 +864,7 @@ struct snd_ctl_elem_id {
>  	snd_ctl_elem_iface_t iface;	/* interface identifier */
>  	unsigned int device;		/* device/client number */
>  	unsigned int subdevice;		/* subdevice (substream) number */
> -	unsigned char name[44];		/* ASCII name of item */
> +	unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];		/* ASCII name of item */
>  	unsigned int index;		/* index of item */
>  };

I think it better to post the same patch to alsa-lib when you add some
changes to ALSA uapi headers because alsa-lib should also have the same
headers.

# I also realized that recent timestamping improvements are not still
# included in alsa-lib header.


Regards

Takashi Sakamoto
Takashi Iwai April 21, 2015, 10:52 a.m. UTC | #3
At Sun, 19 Apr 2015 13:55:46 +0900,
Takashi Sakamoto wrote:
> 
> On Apr 18 2015 02:23, Vinod Koul wrote:
> > we have defined SNDRV_CTL_ELEM_ID_NAME_MAXLEN as size of name array so use
> > this define instead of numeric value
> > 
> > Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> > ---
> >  include/uapi/sound/asound.h |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
> > index 46145a5277fe..a45be6bdcf5b 100644
> > --- a/include/uapi/sound/asound.h
> > +++ b/include/uapi/sound/asound.h
> > @@ -864,7 +864,7 @@ struct snd_ctl_elem_id {
> >  	snd_ctl_elem_iface_t iface;	/* interface identifier */
> >  	unsigned int device;		/* device/client number */
> >  	unsigned int subdevice;		/* subdevice (substream) number */
> > -	unsigned char name[44];		/* ASCII name of item */
> > +	unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];		/* ASCII name of item */
> >  	unsigned int index;		/* index of item */
> >  };
> 
> I think it better to post the same patch to alsa-lib when you add some
> changes to ALSA uapi headers because alsa-lib should also have the same
> headers.

Right.  I copied the file and updated alsa-lib side now.

> # I also realized that recent timestamping improvements are not still
> # included in alsa-lib header.

Yeah, that stuff seems forgotten.

Pierre, could you respin your patches for review?


thanks,

Takashi
Pierre-Louis Bossart April 21, 2015, 2:46 p.m. UTC | #4
>> # I also realized that recent timestamping improvements are not still
>> # included in alsa-lib header.
>
> Yeah, that stuff seems forgotten.
>
> Pierre, could you respin your patches for review?

will do later this week. alsa-lib only, right?
Takashi Iwai April 21, 2015, 2:49 p.m. UTC | #5
At Tue, 21 Apr 2015 07:46:48 -0700,
Pierre-Louis Bossart wrote:
> 
> 
> >> # I also realized that recent timestamping improvements are not still
> >> # included in alsa-lib header.
> >
> > Yeah, that stuff seems forgotten.
> >
> > Pierre, could you respin your patches for review?
> 
> will do later this week. alsa-lib only, right?

Yes, the kernel part has been already merged.


Takashi
diff mbox

Patch

diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
index 46145a5277fe..a45be6bdcf5b 100644
--- a/include/uapi/sound/asound.h
+++ b/include/uapi/sound/asound.h
@@ -864,7 +864,7 @@  struct snd_ctl_elem_id {
 	snd_ctl_elem_iface_t iface;	/* interface identifier */
 	unsigned int device;		/* device/client number */
 	unsigned int subdevice;		/* subdevice (substream) number */
-	unsigned char name[44];		/* ASCII name of item */
+	unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];		/* ASCII name of item */
 	unsigned int index;		/* index of item */
 };