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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 9F23BC6FD1F for ; Wed, 22 Mar 2023 12:41:52 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B6BBBE78; Wed, 22 Mar 2023 13:40:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B6BBBE78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1679488909; bh=0l908Dhy5R/Z2oksXpxHjRVm6BCKihrU+e4g/SYr3N4=; h=Date:From:To:Subject:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=S0JovSlt+w2DPUi02yhmGzRdnYE7rW0nbkuTnBtYVTQdBHKJl2HXZb1vbEi4cUNc+ 9GiiN5RSdZyuqYS+a+yLq2qlXYLFaQyJqwYCvIVAFHFxoVwswsHRq5f3gzMmdDJ/NK jSEhzHQMNiBaG8Dzfy45Vv6qX2cPMQK2t6NfSt7Q= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3D85DF8027B; Wed, 22 Mar 2023 13:40:36 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7AF3AF8027B; Wed, 22 Mar 2023 13:40:32 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 02BA0F80105 for ; Wed, 22 Mar 2023 13:40:25 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 02BA0F80105 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=jWU0iYmy; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=YXt+X/RS Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 9BA6D20D83; Wed, 22 Mar 2023 12:40:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1679488824; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=O8WlaW7xwhQ5ujf65ODy9eZu9DpYfDTLlvf4d5EmsiQ=; b=jWU0iYmy58sHbAqivG4TCn1TOebsOgGQHABM/7PTZoQOx3MMzuax+NU2HKsFgZylaAEQJK 3wAKarsyoOMVQeES70+DRUC3FUttLoYKEJ19aQfAmlMJYJhu9jLIeE1TRlOnLTH8O04LLs Br92HCibXZ4vI/zLxiG5772uegQRC90= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1679488824; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=O8WlaW7xwhQ5ujf65ODy9eZu9DpYfDTLlvf4d5EmsiQ=; b=YXt+X/RSXhfFAzBkrUlrWM64Uvm9CTZ/VLNuyiNmvOAoriu3FJrlTv5CjLz/zV1XVu274K Wgvf8583SKyQD3Cw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8319F138E9; Wed, 22 Mar 2023 12:40:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id bTOEHjj3GmSEYgAAMHmgww (envelope-from ); Wed, 22 Mar 2023 12:40:24 +0000 Date: Wed, 22 Mar 2023 13:40:24 +0100 Message-ID: <87jzz9gds7.wl-tiwai@suse.de> From: Takashi Iwai To: Pavel Hofman Subject: Re: Unlikely big volume range volume range on EMEET webcam In-Reply-To: References: <64d33968-3a5f-83f4-1730-4f91f5b82607@ivitera.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Message-ID-Hash: 5FTLXLLKQGI4XITEOCKLE2O6GIUASJP7 X-Message-ID-Hash: 5FTLXLLKQGI4XITEOCKLE2O6GIUASJP7 X-MailFrom: tiwai@suse.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: "alsa-devel@alsa-project.org" X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri, 17 Mar 2023 14:40:21 +0100, Pavel Hofman wrote: > > > Dne 10. 03. 23 v 14:43 Pavel Hofman napsal(a): > > Hi, > > > > Speaker-webcam eMeet C980 Pro does not play, outputs only silent > > noise. The digital volume seems to be down. > > > > dmesg: > > > > [22406.805176] input: HD Webcam eMeet C980 Pro: HD We as > > /devices/pci0000:00/0000:00:01.2/0000:02:00.0/usb1/1-7/1-7.1/1-7.1:1.0/input/input27 > > [22406.829048] usb 1-7.1: current rate 16000 is different from the > > runtime rate 48000 > > [22406.933044] usb 1-7.1: Warning! Unlikely big volume range > > (=10240), cval->res is probably wrong. > > [22406.933048] usb 1-7.1: [5] FU [PCM Playback Volume] ch = 1, val = > > -7168/3072/1 > > [22407.001043] usb 1-7.1: Warning! Unlikely big volume range > > (=3072), cval->res is probably wrong. > > [22407.001047] usb 1-7.1: [6] FU [Headset Capture Volume] ch = 1, > > val = -1536/1536/1 > > > > Maybe it's a problem with endianness, like e.g. reported in > https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2181737.html > > All the large numbers are divisible by 256. > > But honestly I do not know what the fix should be - converting the > min/max (min >>=8) or the resolution (res >>=8)? > > What difference do the two methods make? The difference is what are real values to be passed to the hardware. The driver scales down and shifts to 0-minimum for ALSA controls in anyway, so the appearance on user-space would be same, but the values to be actually applied to the hardware matter. > What effect does rewriting the cval min/max/res values actually have, > with regards to the reading from the device (get) and writing to the > device (put) methods? You should check the actual raw values and see the influence on the hardware at first in trial-and-error manners. This also means to figure out the corresponding dB level, too. The rest depends whether it's a linear mapping with a parameter correction or better to replace with the fixed values, etc. Takashi