From: Takashi Iwai Subject: Re: [PATCH] [RFC 3/13] Intel SST driver include headers Date: Tue, 07 Jul 2009 08:15:31 +0200 Message-ID: References: <1246604545-12854-1-git-send-email-vinod.koul@intel.com> <98769532B4BB14429434178695419EAE5BBC220A@bgsmsx501.gar.corp.intel.com> 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 mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 8BD97246AB for ; Tue, 7 Jul 2009 08:15:31 +0200 (CEST) In-Reply-To: <98769532B4BB14429434178695419EAE5BBC220A@bgsmsx501.gar.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: "Harsha, Priya" Cc: "Koul, Vinod" , "alsa-devel@alsa-project.org" List-Id: alsa-devel@alsa-project.org At Tue, 7 Jul 2009 11:33:23 +0530, Harsha, Priya wrote: > > >> +/* Firmware Version info */ > >> +struct snd_sst_fw_version { > >> + __u8 build; /* build number*/ > >> + __u8 minor; /* minor number*/ > >> + __u8 major; /* major number*/ > >> + __u8 type; /* build type*/ > >> +}; > >> + > >> +/* Port info structure */ > >> +struct snd_sst_port_info { > >> + __u16 port_type; > > > >Just wondering -- is there big-endian support? > We have not tested this on big-endian, Could you tell us that should > we make it endian safe? When a field is more than one byte, you'd need endian conversion at read/write. I didn't find it thus I suspected it. > >> +struct snd_sst_vol { > >> + unsigned int stream_id; > >> + int volume; > >> + unsigned long ramp_duration; > > > >Are you sure to use long? > >Long can be different between 32 and 64bit architectures. > We will change it to u32. > > > > >> +struct snd_sst_buff_entry { > >> + union { > >> + void *user; > >> + unsigned int offset; > >> + } buffer; > > > >Is it OK? > >The pointer and int can be different sizes. > void* user - is the pointer to the buffer > unsigned int offset - is the offset inside the buffer area. > Not sure if I understand your comment. Please let us know if there > is any issue you see with this structure. A pointer can be 64bit while offset is always 32bit. If they don't have to share the same space, why need to be a union? thanks, Takashi