From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: RFC: minimalistic TLV implementation Date: Thu, 01 Jun 2006 17:40:27 +0200 Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (ns1.suse.de [195.135.220.2]) by alsa.jcu.cz (ALSA's E-mail Delivery System) with ESMTP id E34BCF9 for ; Thu, 1 Jun 2006 17:40:27 +0200 (MEST) Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id A95EFEF36 for ; Thu, 1 Jun 2006 17:40:27 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: Jaroslav Kysela Cc: ALSA development List-Id: alsa-devel@alsa-project.org At Thu, 1 Jun 2006 17:28:41 +0200 (CEST), Jaroslav Kysela wrote: > > diff -r 96e63842ba5d include/asound.h > --- a/include/asound.h Wed May 31 11:55:17 2006 +0200 > +++ b/include/asound.h Thu Jun 1 17:25:38 2006 +0200 > @@ -688,7 +688,7 @@ struct snd_timer_tread { > * * > ****************************************************************************/ > > -#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 3) > +#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 4) > > struct snd_ctl_card_info { > int card; /* card number */ > @@ -818,6 +818,20 @@ struct snd_ctl_elem_value { > unsigned char reserved[128-sizeof(struct timespec)]; > }; > > +struct snd_ctl_tlv { > + unsigned int numid; /* control element numeric identification */ > + unsigned int length; /* in bytes aligned to 4 */ > + /* > + * TLV structure is right behind the struct snd_ctl_tlv: > + * unsigned int type - see SNDRV_CTL_TLVT_* > + * unsigned int length > + * .... data aligned to sizeof(unsigned int), use > + * block_length = (length + (sizeof(unsigned int) - 1)) & > + * ~(sizeof(unsigned int) - 1)) .... > + */ I'd put this detailed comment in tlv.h, and here shows a short comment like: "TLV data is put right behind the struct snd_ctl_tlv. See tlv.h for definition of TLV data". Takashi