All of lore.kernel.org
 help / color / mirror / Atom feed
* SALSA Lib - TLV Deprecated warnings
@ 2007-09-30 15:10 J. Scott Merritt
  2007-10-09  9:05 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: J. Scott Merritt @ 2007-09-30 15:10 UTC (permalink / raw)
  To: alsa-devel

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.

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

* Re: SALSA Lib - TLV Deprecated warnings
  2007-09-30 15:10 SALSA Lib - TLV Deprecated warnings J. Scott Merritt
@ 2007-10-09  9:05 ` Takashi Iwai
  2007-10-21 17:13   ` J. Scott Merritt
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2007-10-09  9:05 UTC (permalink / raw)
  To: J. Scott Merritt; +Cc: alsa-devel

At Sun, 30 Sep 2007 11:10:58 -0400,
J. Scott Merritt wrote:
> 
> 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

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

* Re: SALSA Lib - TLV Deprecated warnings
  2007-10-09  9:05 ` Takashi Iwai
@ 2007-10-21 17:13   ` J. Scott Merritt
  2007-10-22  9:10     ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: J. Scott Merritt @ 2007-10-21 17:13 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

On Tue, 09 Oct 2007 11:05:03 +0200
Takashi Iwai <tiwai@suse.de> wrote:

> At Sun, 30 Sep 2007 11:10:58 -0400,
> J. Scott Merritt wrote:
> > 
> > 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.

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

--- a/src/hctl_macros.h	2007-08-29 12:05:25.000000000 -0400
+++ b/src/hctl_macros.h	2007-10-21 12:54:28.000000000 -0400
@@ -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)
 {

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

* Re: SALSA Lib - TLV Deprecated warnings
  2007-10-21 17:13   ` J. Scott Merritt
@ 2007-10-22  9:10     ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2007-10-22  9:10 UTC (permalink / raw)
  To: J. Scott Merritt; +Cc: alsa-devel

At Sun, 21 Oct 2007 13:13:22 -0400,
J. Scott Merritt wrote:
> 
> On Tue, 09 Oct 2007 11:05:03 +0200
> Takashi Iwai <tiwai@suse.de> wrote:
> 
> > At Sun, 30 Sep 2007 11:10:58 -0400,
> > J. Scott Merritt wrote:
> > > 
> > > 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.
> 
> 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

> 
> --- a/src/hctl_macros.h	2007-08-29 12:05:25.000000000 -0400
> +++ b/src/hctl_macros.h	2007-10-21 12:54:28.000000000 -0400
> @@ -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
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

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

end of thread, other threads:[~2007-10-22 10:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-30 15:10 SALSA Lib - TLV Deprecated warnings J. Scott Merritt
2007-10-09  9:05 ` Takashi Iwai
2007-10-21 17:13   ` J. Scott Merritt
2007-10-22  9:10     ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.