Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1026688imm; Wed, 17 Oct 2018 12:04:15 -0700 (PDT) X-Google-Smtp-Source: ACcGV62FTHERV3Fy7nOrlUNUdRl6LRjCqJotBnSSlWwkGw7dCOPzXS/Op61/AZGjgp2QxjIsWVqi X-Received: by 2002:a17:902:7d94:: with SMTP id a20-v6mr25306228plm.40.1539803055156; Wed, 17 Oct 2018 12:04:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539803055; cv=none; d=google.com; s=arc-20160816; b=gPuJwwrZoFAemBLLrJdCqgjpLJtCouUQuJFE0z3Vj0WYmB5YfZLWSveitQGuJE/3SF lEOfwZj8Wul7O1WwIPYiQJVz5zJMVLQtHWn2d1ZupERQ0tB05tqltmYLKn3RVUq2pc5K W6MOdiBwo/kOYthDdZTGRlO5CsfowxEpfMtK/yZhyuCutt6LMgC9GnIiZd9d9z1yGZc2 y+uCZtD/a05/w7riFFo2TqWAO+6JWemIcGhcaDAhq8BXDHj19+6hErx9bCpvsxsCiTDB vSl1Xfnq+cbg8iAF9VjecAG+xRkWEv6VswjPgjyTNOk5vQn36ZnNzGa7xlTHL1BUrHEH sIPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=RUCMph9Hd9TUGEiVTsDIiTCQKqWbsUM8l8/Y+DTaIk0=; b=Trs4FDPFUFoIz9weZlFiVQW9y01SO9d6JiUeu2qb3ud8pYq9bZZ/VAT2JGxB3f+Ovf SNNzoQfCi17L36k+fLBHj1kR8RB3FmFhlMY1Qmm19IA8r3Iq+3YR05pXpJfHgX9nTKgQ o6uuRSsBsAfPUsytq0hg6V55DJ3wtmUD493MLcCDdqtsTQlm2V/3pXkphywiPgMqGdh7 Lv59iQPSDetcj/ATKRJm0VKDFAdCbIJV+MLJSx+84M0PCnDkw2YYR0K3Gzb/qPVly0UE nUFaOwgb3aDjmrn1Mhs0gHXLJH+oZG5p0EZcmXsr9XysO0XiDUT+Uvt03cw0YqVcyvg7 ED1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e12-v6si16662741pfi.271.2018.10.17.12.03.58; Wed, 17 Oct 2018 12:04:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728315AbeJRC7X (ORCPT + 99 others); Wed, 17 Oct 2018 22:59:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:42446 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728096AbeJRC7W (ORCPT ); Wed, 17 Oct 2018 22:59:22 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 79613B056; Wed, 17 Oct 2018 19:02:18 +0000 (UTC) From: Nicolas Saenz Julienne To: gregkh@linuxfoundation.org Cc: eric@anholt.net, stefan.wahren@i2se.com, linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, tiwai@suse.de, nsaenzjulienne@suse.de, devel@driverdev.osuosl.org Subject: [PATCH v2 1/7] staging: bcm2835-audio: unify FOURCC command definitions Date: Wed, 17 Oct 2018 21:01:50 +0200 Message-Id: <20181017190156.30010-2-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181017190156.30010-1-nsaenzjulienne@suse.de> References: <20181017190156.30010-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The device communicates with the audio core using FOURCC codes. The driver was generating them using different macros/expressions. We now use the same macro to create them and centralize all the definitions. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Takashi Iwai Acked-by: Stefan Wahren --- .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 13 ++++--------- .../bcm2835-audio/vc_vchi_audioserv_defs.h | 4 +++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c index 781754f36da7..aca7008e1921 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c @@ -89,11 +89,6 @@ static int bcm2835_audio_send_simple(struct bcm2835_audio_instance *instance, return bcm2835_audio_send_msg(instance, &m, wait); } -static const u32 BCM2835_AUDIO_WRITE_COOKIE1 = ('B' << 24 | 'C' << 16 | - 'M' << 8 | 'A'); -static const u32 BCM2835_AUDIO_WRITE_COOKIE2 = ('D' << 24 | 'A' << 16 | - 'T' << 8 | 'A'); - static void audio_vchi_callback(void *param, const VCHI_CALLBACK_REASON_T reason, void *msg_handle) @@ -112,8 +107,8 @@ static void audio_vchi_callback(void *param, instance->result = m.u.result.success; complete(&instance->msg_avail_comp); } else if (m.type == VC_AUDIO_MSG_TYPE_COMPLETE) { - if (m.u.complete.cookie1 != BCM2835_AUDIO_WRITE_COOKIE1 || - m.u.complete.cookie2 != BCM2835_AUDIO_WRITE_COOKIE2) + if (m.u.complete.cookie1 != VC_AUDIO_WRITE_COOKIE1 || + m.u.complete.cookie2 != VC_AUDIO_WRITE_COOKIE2) dev_err(instance->dev, "invalid cookie\n"); else bcm2835_playback_fifo(instance->alsa_stream, @@ -329,8 +324,8 @@ int bcm2835_audio_write(struct bcm2835_alsa_stream *alsa_stream, .type = VC_AUDIO_MSG_TYPE_WRITE, .u.write.count = size, .u.write.max_packet = instance->max_packet, - .u.write.cookie1 = BCM2835_AUDIO_WRITE_COOKIE1, - .u.write.cookie2 = BCM2835_AUDIO_WRITE_COOKIE2, + .u.write.cookie1 = VC_AUDIO_WRITE_COOKIE1, + .u.write.cookie2 = VC_AUDIO_WRITE_COOKIE2, }; unsigned int count; int err, status; diff --git a/drivers/staging/vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h b/drivers/staging/vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h index 1a7f0884ac9c..dc62875cfdca 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h +++ b/drivers/staging/vc04_services/bcm2835-audio/vc_vchi_audioserv_defs.h @@ -7,8 +7,10 @@ #define VC_AUDIOSERV_MIN_VER 1 #define VC_AUDIOSERV_VER 2 -/* FourCC code used for VCHI connection */ +/* FourCC codes used for VCHI communication */ #define VC_AUDIO_SERVER_NAME MAKE_FOURCC("AUDS") +#define VC_AUDIO_WRITE_COOKIE1 MAKE_FOURCC("BCMA") +#define VC_AUDIO_WRITE_COOKIE2 MAKE_FOURCC("DATA") /* * List of screens that are currently supported -- 2.19.1