Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2728860imm; Tue, 4 Sep 2018 09:05:10 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdaa2LrE4L78IP+EnBEOb0JZuO0WqFGtTnLlmqolS2BWX3OMMRi1YQAxpG+PoefIqgtKQlmi X-Received: by 2002:a17:902:b218:: with SMTP id t24-v6mr2902192plr.235.1536077110485; Tue, 04 Sep 2018 09:05:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536077110; cv=none; d=google.com; s=arc-20160816; b=jqjEUBWVet9kvfMBD/Ll1/VzSWulBBMZ/oaffRGDP5dE+ZjD3NKOAo9rqIDE/8ux4b sGvbrdZlZdcIXL67Ed6c/s7rwsM8gUP4mfGPMN1uzh3NTO7tw2tmaLN+HjKSGY1Cj5lr NHfkSygRZIIJoWdH9hHSZyujfk752byXPfY0TNTeSQtu7+4VM64vezu4+N33KSBOsLRP IEGkne7qNuhSefN+e5qzYHLOnBXKoioi9Wdbe8JBrE57iVmDqbgGmI/rvBi3XnJb4w6d NCbabLDgNEkrWvcY/KovRcoWs/5+8DuBjv8tO/3FvmdtsGegS4cJZHKYnipCA5bgZFoe QKZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=iEGsceLMFdVhNEbWsb0RK3xLGzwF9RrTeX3cvbFQW0U=; b=qvJQzNMYFqAGR8pVgwRsr4Xz3HpGikYizhq4jw8O3f7xpmNIxlyKfGCN7z9i12nbz/ t0Psk3l+Px6HdbISy0G5M7rNrBpCQfCfg5mUBgPRdc0e47ddyL5QKn0ZQWsR3P7q6a2r DmTEoUX1MzJVXkBd/BKtiwqVUNFCP1/vV4qNMm7//fmD503K39++6BpL8M9FnI92Rb+g XsR4ioB5hHRPDQKNLqMyvezbv0T0MJbSYVJeO1KVJ7min+i66XnScYQ74KM78xxwQnJR iWN7PcLSeAHuVGHF4vli8/MziBSlJxd+eri27ioDA4SKF4ap3YewsoKefWZA9uYbj0ef sA/g== 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 v3-v6si20811630plp.85.2018.09.04.09.04.48; Tue, 04 Sep 2018 09:05:10 -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 S1727657AbeIDUYr (ORCPT + 99 others); Tue, 4 Sep 2018 16:24:47 -0400 Received: from mx2.suse.de ([195.135.220.15]:50766 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726367AbeIDUYq (ORCPT ); Tue, 4 Sep 2018 16:24:46 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9C2BBB09E; Tue, 4 Sep 2018 15:59:01 +0000 (UTC) From: Takashi Iwai To: Greg Kroah-Hartman Cc: Eric Anholt , Stefan Wahren , linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/29] staging: bcm2835-audio: Remove redundant spdif stream ctls Date: Tue, 4 Sep 2018 17:58:31 +0200 Message-Id: <20180904155858.8001-3-tiwai@suse.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180904155858.8001-1-tiwai@suse.de> References: <20180904155858.8001-1-tiwai@suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The "IEC958 Playback Stream" control does basically the very same thing as "IEC958 Playback Default" redundantly. The former should have been stream-specific and restored after closing the stream, but we don't do in that way. Since it's nothing but confusion, remove this fake. Signed-off-by: Takashi Iwai --- .../vc04_services/bcm2835-audio/bcm2835-ctl.c | 51 ------------------- 1 file changed, 51 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c index 04ea3ec7f64f..9020887e1ada 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c @@ -233,48 +233,6 @@ static int snd_bcm2835_spdif_mask_get(struct snd_kcontrol *kcontrol, return 0; } -static int snd_bcm2835_spdif_stream_info(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_info *uinfo) -{ - uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; - uinfo->count = 1; - return 0; -} - -static int snd_bcm2835_spdif_stream_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct bcm2835_chip *chip = snd_kcontrol_chip(kcontrol); - int i; - - mutex_lock(&chip->audio_mutex); - - for (i = 0; i < 4; i++) - ucontrol->value.iec958.status[i] = - (chip->spdif_status >> (i * 8)) & 0xff; - - mutex_unlock(&chip->audio_mutex); - return 0; -} - -static int snd_bcm2835_spdif_stream_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) -{ - struct bcm2835_chip *chip = snd_kcontrol_chip(kcontrol); - unsigned int val = 0; - int i, change; - - mutex_lock(&chip->audio_mutex); - - for (i = 0; i < 4; i++) - val |= (unsigned int)ucontrol->value.iec958.status[i] << (i * 8); - change = val != chip->spdif_status; - chip->spdif_status = val; - - mutex_unlock(&chip->audio_mutex); - return change; -} - static struct snd_kcontrol_new snd_bcm2835_spdif[] = { { .iface = SNDRV_CTL_ELEM_IFACE_PCM, @@ -290,15 +248,6 @@ static struct snd_kcontrol_new snd_bcm2835_spdif[] = { .info = snd_bcm2835_spdif_mask_info, .get = snd_bcm2835_spdif_mask_get, }, - { - .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | - SNDRV_CTL_ELEM_ACCESS_INACTIVE, - .iface = SNDRV_CTL_ELEM_IFACE_PCM, - .name = SNDRV_CTL_NAME_IEC958("", PLAYBACK, PCM_STREAM), - .info = snd_bcm2835_spdif_stream_info, - .get = snd_bcm2835_spdif_stream_get, - .put = snd_bcm2835_spdif_stream_put, - }, }; int snd_bcm2835_new_ctl(struct bcm2835_chip *chip) -- 2.18.0