From: Takashi Iwai Subject: Re: [PATCH - UCM 1/1] ucm: add binary configure file parse Date: Wed, 21 Jan 2015 21:01:04 +0100 Message-ID: References: <1421805316-3070-1-git-send-email-han.lu@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 582E9260494 for ; Wed, 21 Jan 2015 21:01:05 +0100 (CET) In-Reply-To: <1421805316-3070-1-git-send-email-han.lu@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: han.lu@intel.com Cc: alsa-devel@alsa-project.org, liam.r.girdwood@intel.com List-Id: alsa-devel@alsa-project.org At Wed, 21 Jan 2015 09:55:16 +0800, han.lu@intel.com wrote: > > From: "Lu, Han" > > with cset command, UCM set kcontrol parameters directly: > cset "name='' 1<,2,3,...>" > This patch enables UCM to set kcontrol with parameters from > configure file: > cset-bin-file "name='' " > where "cset-bin-file" is a newly added keyword alongside of "cset", > to indicate cset with binary data in file. > The binary data in file is parameter for audio DSPs, and it's just > passed by UCM/ALSA as raw data. The data type of parameter elements > must be byte, and the count must matches driver definition. > > Signed-off-by: Lu, Han The contents are almost good, but I got a few compile warnings. ================ main.c: In function 'binary_file_parse': main.c:185:2: warning: implicit declaration of function 'stat' [-Wimplicit-function-declaration] if (stat(filepath, &st) == -1) { ^ main.c:201:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (read(fd, res, sz) != sz) { ^ main.c: In function 'execute_sequence': main.c:252:5: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized] if (err < 0) ^ main.c:285:6: note: 'err' was declared here int err = 0; ^ ================ Takashi