From patchwork Thu Apr 14 15:23:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Thierry X-Patchwork-Id: 12813672 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4D511C433F5 for ; Thu, 14 Apr 2022 15:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KD0pv3B86Dkfti88uTO922YN0/FyhjDDvAKkUaBwnp4=; b=ot11Gwa0xZCqi0 nvEMkX+ivCwGKfirXrvUvu0VmnP4TgSfYrtZ5CWQgPHjFbsJHW/iaJqT2O8cZElYUpI0iqleC+WlP NUA6Nps/A170WANG6VuN6zrac2VBunT6UJGP+fZ/R/BCtBEmw7PtYbngMlNJkcyw0M2sOJ7hY68J0 aNrfvsGO80kZIPt8cNGvuRRzFT5cut1rvyH6eRV9NbwJZecwi5h5QsdAVYH5u1GEUZRKwIfTj2av9 45VzYSHKYu89igXtDf+QUPb7MSSFiTaNVlIRxwz9TDCQ/edl6SLZbArkuRHS00QxiNamPIqPAhQ8V 3bSlkkKvtnZE1EpEOHdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nf1KO-006DBo-DC; Thu, 14 Apr 2022 15:24:12 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nf1K9-006D4g-2z for linux-arm-kernel@lists.infradead.org; Thu, 14 Apr 2022 15:23:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649949836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IGRJLz7z/3jGasxkIFljjT/M7YCjB3xjYdcrHt5JsPY=; b=Iq2G0k7sijaiAiim8BX4ZFhpFpYonhUs+OqKnpE9yF8n0S/Gd8S0poxjNvNvJYdDkK55Bc 5ynnxqP5zev3NpeZidE6tZlqXizmZiFlu/fXeRfkXVvbLvVTwOpD1sfINQn3wi0Q1zZcD/ r4KWQAeGEwa7NCy3W9/JlyMQwzt3iQA= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-159-O2KVMXoKORWYbeUdpfR5QQ-1; Thu, 14 Apr 2022 11:23:55 -0400 X-MC-Unique: O2KVMXoKORWYbeUdpfR5QQ-1 Received: by mail-qv1-f72.google.com with SMTP id fw9-20020a056214238900b0043522aa5b81so4593949qvb.21 for ; Thu, 14 Apr 2022 08:23:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IGRJLz7z/3jGasxkIFljjT/M7YCjB3xjYdcrHt5JsPY=; b=E8JJi4RNsC9bJNS25W48Moub/Sg9BbPXA69uZUtooIWtxvgubS/Mo26yz++YuyKZdD yZVXjmV6fRvvffyIG8+NDzrdkK5pFZKTrJ6mncfHhez7Ff3AD+uNBabJ8vPCelYvbcXB 45vm92s+JGw/32jy2kzl9lPTG7iZEVSbG0QijA1HanE/73MFR9SAKC68xPGQjp4VlxrT BdkNkI+xzFoJZJaF1N4bwJfHJvjrjbVmzGpbhB5PHBiLgWa5MQCmH2MI5IIbw8XU8T2n 3lXHomz3bwVF5GMZDaAs2yGRyh3SzlAeh0j5VGLBD76I+VIW9OVBBaXe7kLmEXmFugaT 21Mg== X-Gm-Message-State: AOAM5339RNp00yvCkKUWBnd5X5QQHuUdTPvWpLdNnKa9Gti6FnKONc05 Qf/UzzCRjoyFli8oYqFiJ9gl14UB9r/JOjDyFXVSBV9BbpDRfy7H2cnTadZ7ugfT8jB4ubvPOTa jw4KLE53bcDGhJoz+idwl1lVYMOMoRGKUPdo= X-Received: by 2002:ad4:5dc7:0:b0:443:6f15:fe32 with SMTP id m7-20020ad45dc7000000b004436f15fe32mr3852125qvh.6.1649949834659; Thu, 14 Apr 2022 08:23:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDIMnHIaFBi6EAQ93deNI9TIf/lTnkCTwd5RkyfWbj4eTfNhDjJwcfrcjQzxV8pE0w7SpAiw== X-Received: by 2002:ad4:5dc7:0:b0:443:6f15:fe32 with SMTP id m7-20020ad45dc7000000b004436f15fe32mr3852106qvh.6.1649949834481; Thu, 14 Apr 2022 08:23:54 -0700 (PDT) Received: from fedora.redhat.com (modemcable200.11-22-96.mc.videotron.ca. [96.22.11.200]) by smtp.gmail.com with ESMTPSA id p5-20020a378d05000000b0069beaffd5b3sm1166038qkd.4.2022.04.14.08.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Apr 2022 08:23:54 -0700 (PDT) From: Adrien Thierry To: Greg Kroah-Hartman , Nicolas Saenz Julienne , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , Takashi Iwai Cc: linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Adrien Thierry Subject: [PATCH 1/2] staging: bcm2835-audio: fully describe config symbol Date: Thu, 14 Apr 2022 11:23:39 -0400 Message-Id: <20220414152340.68932-2-athierry@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220414152340.68932-1-athierry@redhat.com> References: <20220414152340.68932-1-athierry@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=athierry@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_082357_297128_D9FB7654 X-CRM114-Status: GOOD ( 13.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Explain SND_BCM2835 config option in more detail, especially the implications of using the bcm2835-audio driver in conjunction with vc4 for HDMI audio. Reported by checkpatch: WARNING: please write a help paragraph that fully describes the config symbol FILE: drivers/staging/vc04_services/bcm2835-audio/Kconfig:2 Signed-off-by: Adrien Thierry --- drivers/staging/vc04_services/bcm2835-audio/Kconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/Kconfig b/drivers/staging/vc04_services/bcm2835-audio/Kconfig index d32ea348e846..7cd0b3c0cae4 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/Kconfig +++ b/drivers/staging/vc04_services/bcm2835-audio/Kconfig @@ -5,5 +5,8 @@ config SND_BCM2835 select SND_PCM select BCM2835_VCHIQ help - Say Y or M if you want to support BCM2835 built in audio + Say Y or M if you want to support BCM2835 built in audio. + This driver handles both 3.5mm and HDMI audio. However, please + note that when HDMI audio is enabled with this driver, the vc4 + driver cannot be used simultaneously, otherwise HDMI will break. From patchwork Thu Apr 14 15:23:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Thierry X-Patchwork-Id: 12813673 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6293AC433F5 for ; Thu, 14 Apr 2022 15:25:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EYuxCJU/NkZUFyVND48d4RE+HjUtsqQGtNQ+7sYKDiE=; b=io2wqj68H+kbnf yuGE2eGBr4qj4HX0SC4R42qA1VijAqvoUIaeuJFulrYNCeFvwM27B5WdTAtWcf95c1ETUfxL/a3nI bcpjfxH/mX6+iJVUgHDrws0s4b5qRQz0CqdAFkU1zdq8RIwo+zZqQH4HfNR+cwVFL4KqGt1RfyFbu nfpWmVvgHaSi4S4YEUtGwLk0+ppOBtjtiNDAN89UaUWvsyE7jrhgdbeDzMSCNUNTLfq+kTz4pH5SI eYdyceKoUxmt25PzWdQFn+fuUVucrd6HtyyOc/q/ZgV5GwydOXlmfDqw7Y3AgiBZQw0u+jpMXYSBM UDU2tzDhtfzO88hJM0Fg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nf1KY-006DF0-PL; Thu, 14 Apr 2022 15:24:22 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nf1KB-006D65-3A for linux-arm-kernel@lists.infradead.org; Thu, 14 Apr 2022 15:24:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649949838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ymoHjSbTJfTWENDrZAMakMAu3NTQlX8fnQuTkXZ1c+0=; b=UKuNqDmdjqtGg2fzwXK9VtmM/TYpOxAGNBzrAyJBnghLK9pCeuoVXXOh4KTnXvgc1YgZZO /OP+X5BChvRM8jGKr8sgb7kISwOIAjN+gh6rkR9Y5UjP0jVTO4miiJ4C+8vYBK1+ohqT7k /bwl4WbCIdi/V16wi9ZjG/b9xEzqzeY= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-73-YTTNHVkuOSOcAW3B-HxxzA-1; Thu, 14 Apr 2022 11:23:57 -0400 X-MC-Unique: YTTNHVkuOSOcAW3B-HxxzA-1 Received: by mail-qv1-f70.google.com with SMTP id gh5-20020a05621429c500b004443be8db85so4628761qvb.11 for ; Thu, 14 Apr 2022 08:23:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ymoHjSbTJfTWENDrZAMakMAu3NTQlX8fnQuTkXZ1c+0=; b=GETUMGhMSWZWK4D/gkifZ0NtOYszN7Ld/NEbxNImD8m6VQrG1cTn0lzIXa2vAnW7SK rCKBZUfhtzkaw/0UVXWhJqw33mySyIRaDqx8g78zpY/FS84+zviS869mZYyIg1L8RVk1 6WvMgwiTyyP7Se0oN9NkeLzqBO2S3wBlEVqEOi87GCxSjBKZLsHQ4omlffy6bg25hT8l zy/i+cH9WJbF1wgFu4lCnUiugslu3SSFZERR0ffk+nL3HpebvbbnK1RJ6wuN9GtN78b9 M9HIibiBVslhZcdfiqSf/IEowmVBAmk8AuQ7u+Wae7g/0Yg/lC0NYAW5Sl0YZYBmgk3p IphA== X-Gm-Message-State: AOAM531rq0Jj1Khl5+vZoJH0vldS8Bl+CeNP70fs1CHG9KPXaYQZIoKM 4ysJhG4gZklcQVv3XZrKuZaJksnUyNbaC5j0O7Fr3KX9aESFEX2A4RuntX+MnlU9ddC7pICdHte xUOeCJRflJEmKb7dboXifSzFdf0DNZcQOM70= X-Received: by 2002:a05:622a:1793:b0:2e1:ba41:ed2 with SMTP id s19-20020a05622a179300b002e1ba410ed2mr2180112qtk.238.1649949836593; Thu, 14 Apr 2022 08:23:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzs3AjMBWvnaeFFepMGw6xBfV7UrXSMsLV3Nf+VF6QIpa+RPOmd63l8E4yiuw2decacPo8cmQ== X-Received: by 2002:a05:622a:1793:b0:2e1:ba41:ed2 with SMTP id s19-20020a05622a179300b002e1ba410ed2mr2180095qtk.238.1649949836406; Thu, 14 Apr 2022 08:23:56 -0700 (PDT) Received: from fedora.redhat.com (modemcable200.11-22-96.mc.videotron.ca. [96.22.11.200]) by smtp.gmail.com with ESMTPSA id p5-20020a378d05000000b0069beaffd5b3sm1166038qkd.4.2022.04.14.08.23.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Apr 2022 08:23:56 -0700 (PDT) From: Adrien Thierry To: Greg Kroah-Hartman , Nicolas Saenz Julienne , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , Takashi Iwai Cc: linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Adrien Thierry Subject: [PATCH 2/2] staging: bcm2835-audio: clean code style warnings Date: Thu, 14 Apr 2022 11:23:40 -0400 Message-Id: <20220414152340.68932-3-athierry@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220414152340.68932-1-athierry@redhat.com> References: <20220414152340.68932-1-athierry@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=athierry@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_082359_266474_2AE9969E X-CRM114-Status: GOOD ( 14.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Clean a few minor code style warnings. Reported by checkpatch: CHECK: Lines should not end with a '(' FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:85: CHECK: No space is necessary after a cast FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:240: CHECK: struct mutex definition without comment FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:14: CHECK: struct mutex definition without comment FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835.h:64: Signed-off-by: Adrien Thierry --- drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 5 ++--- drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c index f2ef1d641e70..68e8d491a7ec 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c @@ -82,8 +82,7 @@ void bcm2835_playback_fifo(struct bcm2835_alsa_stream *alsa_stream, } /* open callback */ -static int snd_bcm2835_playback_open_generic( - struct snd_pcm_substream *substream, int spdif) +static int snd_bcm2835_playback_open_generic(struct snd_pcm_substream *substream, int spdif) { struct bcm2835_chip *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; @@ -237,7 +236,7 @@ static void snd_bcm2835_pcm_transfer(struct snd_pcm_substream *substream, { struct snd_pcm_runtime *runtime = substream->runtime; struct bcm2835_alsa_stream *alsa_stream = runtime->private_data; - void *src = (void *) (substream->runtime->dma_area + rec->sw_data); + void *src = (void *)(substream->runtime->dma_area + rec->sw_data); bcm2835_audio_write(alsa_stream, bytes, src); } diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c index d567a2e3f70c..e429b33b4d39 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c @@ -11,7 +11,7 @@ struct bcm2835_audio_instance { struct device *dev; unsigned int service_handle; struct completion msg_avail_comp; - struct mutex vchi_mutex; + struct mutex vchi_mutex; /* Serialize vchiq access */ struct bcm2835_alsa_stream *alsa_stream; int result; unsigned int max_packet; diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h index 51066ac8eea5..38b7451d77b2 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h @@ -61,7 +61,7 @@ struct bcm2835_chip { unsigned int opened; unsigned int spdif_status; - struct mutex audio_mutex; + struct mutex audio_mutex; /* Serialize chip data access */ struct bcm2835_vchi_ctx *vchi_ctx; };