Skip to contentSkip to conversation

SALSA Lib - TLV Deprecated warnings

DISCUSSION J. Scott Merritt 2 participants 4 messages Sep 30, 2007 – Oct 22, 2007

lore
Share & tools
lore
#0 lore raw

It appears that if SALSA Lib 0.0.12 is built -without- TLV enabled in the configuration options, then simply -including- asoundlib.h from an application program will trigger deprecated warnings on some of the TLV read/write function definitions (even though they are not called from the application).

Is there something we can do to the header files to eliminate these warnings ?

Thanks, Scott.

#1 lore raw

At Sun, 30 Sep 2007 11:10:58 -0400,

Quoted 9 lines · J. Scott Merritt

It appears that if SALSA Lib 0.0.12 is built -without- TLV enabled in the configuration options, then simply -including- asoundlib.h from an application program will trigger deprecated warnings on some of the TLV read/write function definitions (even though they are not called from the application).

Is there something we can do to the header files to eliminate these warnings ?

Try to build with --disable-deprecated option. See GENERAL:MISC section in README.

Takashi

#2 lore raw
Quoted 9 lines · On Tue, 09 Oct 2007 11:05:03 +0200 Takashi Iwai <[email protected]> wrote:

At Sun, 30 Sep 2007 11:10:58 -0400,

Quoted 7 lines · J. Scott Merritt

It appears that if SALSA Lib 0.0.12 is built -without- TLV enabled in the configuration options, then simply -including- asoundlib.h from an application program will trigger deprecated warnings on some of the TLV read/write function definitions (even though they are not called from the application).

Quoted 5 lines
Quoted 2 lines

Is there something we can do to the header files to eliminate these warnings ?

Try to build with --disable-deprecated option. See GENERAL:MISC section in README.

How about the following patch to SALSA Lib 0.0.12 to eliminate
the warnings if TLV is not enabled ? ... Thanks, Scott.

src/hctl_macros.h +23 -0
@@ -129,6 +129,7 @@
 	return snd_ctl_elem_write(elem->hctl->ctl, value);
 }
 
+#if SALSA_HAS_TLV_SUPPORT
 static inline
 int snd_hctl_elem_tlv_read(snd_hctl_elem_t *elem, unsigned int *tlv,
 			   unsigned int tlv_size)
@@ -148,6 +149,28 @@
 	return snd_ctl_elem_tlv_command(elem->hctl->ctl, &elem->id, tlv);
 }
 
+#else /* SALSA_HAS_TLV_SUPPORT */
+
+static inline __SALSA_NOT_IMPLEMENTED
+int snd_hctl_elem_tlv_read(snd_hctl_elem_t *elem, unsigned int *tlv,
+			   unsigned int tlv_size)
+{
+	return -ENXIO;
+}
+
+static inline __SALSA_NOT_IMPLEMENTED
+int snd_hctl_elem_tlv_write(snd_hctl_elem_t *elem, const unsigned int *tlv)
+{
+	return -ENXIO;
+}
+
+static inline __SALSA_NOT_IMPLEMENTED
+int snd_hctl_elem_tlv_command(snd_hctl_elem_t *elem, const unsigned int *tlv)
+{
+	return -ENXIO;
+}
+#endif /* SALSA_HAS_TLV_SUPPORT */
+
 static inline
 snd_hctl_t *snd_hctl_elem_get_hctl(snd_hctl_elem_t *elem)
 {
#3 lore raw

At Sun, 21 Oct 2007 13:13:22 -0400,

Quoted 13 lines · J. Scott Merritt
Quoted 9 lines · On Tue, 09 Oct 2007 11:05:03 +0200 Takashi Iwai <[email protected]> wrote:

At Sun, 30 Sep 2007 11:10:58 -0400,

Quoted 7 lines · J. Scott Merritt

It appears that if SALSA Lib 0.0.12 is built -without- TLV enabled in the configuration options, then simply -including- asoundlib.h from an application program will trigger deprecated warnings on some of the TLV read/write function definitions (even though they are not called from the application).

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Is there something we can do to the header files to eliminate these warnings ?

Try to build with --disable-deprecated option. See GENERAL:MISC section in README.

How about the following patch to SALSA Lib 0.0.12 to eliminate
the warnings if TLV is not enabled ? ... Thanks, Scott.

Looks good. I merged it and released as 0.0.13.
Thanks.

Takashi

Quoted 46 lines
src/hctl_macros.h +23 -0
@@ -129,6 +129,7 @@
 	return snd_ctl_elem_write(elem->hctl->ctl, value);
 }
 
+#if SALSA_HAS_TLV_SUPPORT
 static inline
 int snd_hctl_elem_tlv_read(snd_hctl_elem_t *elem, unsigned int *tlv,
 			   unsigned int tlv_size)
@@ -148,6 +149,28 @@
 	return snd_ctl_elem_tlv_command(elem->hctl->ctl, &elem->id, tlv);
 }
 
+#else /* SALSA_HAS_TLV_SUPPORT */
+
+static inline __SALSA_NOT_IMPLEMENTED
+int snd_hctl_elem_tlv_read(snd_hctl_elem_t *elem, unsigned int *tlv,
+			   unsigned int tlv_size)
+{
+	return -ENXIO;
+}
+
+static inline __SALSA_NOT_IMPLEMENTED
+int snd_hctl_elem_tlv_write(snd_hctl_elem_t *elem, const unsigned int *tlv)
+{
+	return -ENXIO;
+}
+
+static inline __SALSA_NOT_IMPLEMENTED
+int snd_hctl_elem_tlv_command(snd_hctl_elem_t *elem, const unsigned int *tlv)
+{
+	return -ENXIO;
+}
+#endif /* SALSA_HAS_TLV_SUPPORT */
+
 static inline
 snd_hctl_t *snd_hctl_elem_get_hctl(snd_hctl_elem_t *elem)
 {

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel