From: Takashi Iwai Subject: Re: [PATCH] [RFC 3/13] Intel SST driver include headers Date: Tue, 07 Jul 2009 08:53:08 +0200 Message-ID: References: <1246604545-12854-1-git-send-email-vinod.koul@intel.com> <98769532B4BB14429434178695419EAE5BBC220A@bgsmsx501.gar.corp.intel.com> <98769532B4BB14429434178695419EAE5BBC22D0@bgsmsx501.gar.corp.intel.com> <98769532B4BB14429434178695419EAE5BBC2366@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 58B2F1038C1 for ; Tue, 7 Jul 2009 08:53:08 +0200 (CEST) In-Reply-To: <98769532B4BB14429434178695419EAE5BBC2366@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 12:21:00 +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. > >> So, does it look safe to keep the code as such? > > > >Unlikely... > > > >> We are using the bit > >> field in union only for ease of setting/getting bit values and not > >> for communication. > > > >What I meant is the data used for the communication. Not the > >communication method itself. Here the communication includes the > >firmware data, too. > > > >If the data is created by the driver locally and used only inside the > >driver, then it's fine. Otherwise, you shouldn't use bit fields. > > > Yes. This is the case. The data is generated internally to the > driver and used inside the driver only. When the data is > communicated to the firmware, only the 32bit register is passed and > the bit fields are not used. Hm, then I misread the code too quickly. I thought the 32bit data is generated from the bit fields in a way depending on the architecture. Takashi