Skip to contentSkip to conversation

ALSA: asound.h - use SNDRV_CTL_ELEM_ID_NAME_MAXLEN

PATCH Applied Vinod Koul 5 participants 9 messages Apr 17, 2015 – Apr 21, 2015

Subsystems (3)
lore
Share & tools
lore

Vinod Koul

author
#0 lore raw

PATCH 1/2 ALSA: asound.h - use SNDRV_CTL_ELEM_ID_NAME_MAXLEN

we have defined SNDRV_CTL_ELEM_ID_NAME_MAXLEN as size of name array so use this define instead of numeric value

---
 include/uapi/sound/asound.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/sound/asound.h +1 -1
index 46145a5277fe..a45be6bdcf5b 100644
@@ -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 */
 };
 
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 2/2 ASoC: intel - use SNDRV_CTL_ELEM_ID_NAME_MAXLEN

we have defined SNDRV_CTL_ELEM_ID_NAME_MAXLEN as size of name array so use this define instead of numeric value

---
 sound/soc/intel/atom/sst-atom-controls.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/atom/sst-atom-controls.h +1 -1
index daecc58f28af..c55f76a535b3 100644
@@ -695,7 +695,7 @@ struct sst_gain_mixer_control {
 	u16 module_id;
 	u16 pipe_id;
 	u16 task_id;
-	char pname[44];
+	char pname[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
 	struct snd_soc_dapm_widget *w;
 };
 
Signature · 1 line
1.7.9.5
#2 lore raw

Re: [PATCH 2/2] ASoC: intel - use SNDRV_CTL_ELEM_ID_NAME_MAXLEN

At Fri, 17 Apr 2015 22:53:33 +0530,

Quoted 5 lines · Vinod Koul

we have defined SNDRV_CTL_ELEM_ID_NAME_MAXLEN as size of name array so use this define instead of numeric value

I leave this to Mark.

thanks,

Takashi

Quoted 20 lines
---
 sound/soc/intel/atom/sst-atom-controls.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/atom/sst-atom-controls.h +1 -1
index daecc58f28af..c55f76a535b3 100644
@@ -695,7 +695,7 @@ struct sst_gain_mixer_control {
 	u16 module_id;
 	u16 pipe_id;
 	u16 task_id;
-	char pname[44];
+	char pname[SNDRV_CTL_ELEM_ID_NAME_MAXLEN];
 	struct snd_soc_dapm_widget *w;
 };
 
Signature · 1 line
1.7.9.5
maintainer Applied
#3 lore raw

Re: [PATCH 2/2] ASoC: intel - use SNDRV_CTL_ELEM_ID_NAME_MAXLEN

In reply to Vinod Koul
Quoted 2 lines · Vinod Koul

we have defined SNDRV_CTL_ELEM_ID_NAME_MAXLEN as size of name array so use this define instead of numeric value

Applied, thanks.

Applied
#4 lore raw
In reply to Vinod Koul

At Fri, 17 Apr 2015 22:53:32 +0530,

Quoted 5 lines · Vinod Koul

we have defined SNDRV_CTL_ELEM_ID_NAME_MAXLEN as size of name array so use this define instead of numeric value

Applied, thanks.

Takashi

Quoted 20 lines
---
 include/uapi/sound/asound.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/sound/asound.h +1 -1
index 46145a5277fe..a45be6bdcf5b 100644
@@ -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 */
 };
 
Signature · 1 line
1.7.9.5
#5 lore raw
In reply to Vinod Koul
Quoted 13 lines · Vinod Koul

we have defined SNDRV_CTL_ELEM_ID_NAME_MAXLEN as size of name array so use this define instead of numeric value

---
 include/uapi/sound/asound.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/sound/asound.h +0 -0
index 46145a5277fe..a45be6bdcf5b 100644

include/uapi/sound/asound.h struct snd_ctl_elem_id { · line 869

Quoted 7 lines
include/uapi/sound/asound.h +1 -1
@@ -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

#6 lore raw

At Sun, 19 Apr 2015 13:55:46 +0900,

Quoted 10 lines · Takashi Sakamoto
Quoted 8 lines · Vinod Koul

we have defined SNDRV_CTL_ELEM_ID_NAME_MAXLEN as size of name array so use this define instead of numeric value

---
 include/uapi/sound/asound.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines

include/uapi/sound/asound.h struct snd_ctl_elem_id { · line 869

Quoted 12 lines
include/uapi/sound/asound.h +1 -1
index 46145a5277fe..a45be6bdcf5b 100644
@@ -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.

Quoted 2 lines

# 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

#7 lore raw
Quoted 7 lines
Quoted 3 lines

# 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?

#8 lore raw

At Tue, 21 Apr 2015 07:46:48 -0700,

Quoted 10 lines · Pierre-Louis Bossart
Quoted 8 lines
Quoted 4 lines

# 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