Received: by 10.223.164.202 with SMTP id h10csp2294888wrb; Thu, 16 Nov 2017 12:40:16 -0800 (PST) X-Google-Smtp-Source: AGs4zMaHBYufeLyDH4QRSrcdHqGkZRcUp1ZTOTUQbMC/yOZhDpR2ul4xOsfRk6h5NveuzZ9oXYNR X-Received: by 10.99.183.6 with SMTP id t6mr2316527pgf.128.1510864816792; Thu, 16 Nov 2017 12:40:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510864816; cv=none; d=google.com; s=arc-20160816; b=HNfb7H09qnzYZ1QinpuRIbQz1XqFS6rOQggxh70NBjO5Y3MVBpH9FsWiM6LAqU8pff EWRbNwKNdXlovOjb4D+bQHGK3H4zjWkBVGANOpYw4f+FLu4P6Xjdmn/w9h5tpWGWh0BW uyEpNRqJA9FxmmimYOukSaKFoAkoEsUiiR5E6wZkkYcxOCgS77df9TFZSErdfCANQgJz FYq/eFiSNgxuScpOgV8574N9I2kUa/xt2vmIsT7iHoVATZSLk+xX0/Yr/+5Dg9/M50Gr eexBPU9bkzelphjcl79MlXkr2b//tdkslrngS4DX6i3X4Y5tCSFSMwYkyaAMenMkkbdh 1ulw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature:arc-authentication-results; bh=8A7rUldqkhYGi96NUPmDfRwQIkgH+/douIpONCSxc54=; b=MKCkqm4oKwE0Rp8R8uN1IwzPcZC4jIuemFcdwGrqGoivzdfvvbgjM7+/uwCw9LlpZr NVV2S8yzehbso5q6Vg35P8Eci4jFcGAGJ1ZKPu647nZd5YsgYU/NUMmfpuuPtAV7n/oT tOrpu9AJF/lNX4dR3kADbuoEyT6QkDwyOLDsicKWV6bq6cRNAMrg+6eUzEaG7Ycj6stk dKA1tsZjxbBOeH0Uv630tHvJ3y1j8JiEjtjBW+Ov2St3M3L0M7D0rZxzfpR7ekp0MNq8 ibvZ+d4bd7be1gwLrO06q8mGuAmrCzvy+CsQhwF36VTstECmLDmFRGfFxvDFsOFd/CZr WRiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jusst.de header.s=default header.b=jYQtqMuW; 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 66si1594775pfn.181.2017.11.16.12.40.03; Thu, 16 Nov 2017 12:40:16 -0800 (PST) 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; dkim=pass header.i=@jusst.de header.s=default header.b=jYQtqMuW; 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 S1759810AbdKPQpf (ORCPT + 91 others); Thu, 16 Nov 2017 11:45:35 -0500 Received: from jusst.de ([188.40.114.84]:53435 "EHLO web01.jusst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759798AbdKPQpV (ORCPT ); Thu, 16 Nov 2017 11:45:21 -0500 X-Greylist: delayed 598 seconds by postgrey-1.27 at vger.kernel.org; Thu, 16 Nov 2017 11:45:21 EST Received: from localhost (localhost [127.0.0.1]) by web01.jusst.de (Postfix) with ESMTP id A64A91B02CFE; Thu, 16 Nov 2017 17:35:22 +0100 (CET) Authentication-Results: web01.jusst.de (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=jusst.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=jusst.de; h= x-mailer:message-id:date:date:subject:subject:from:from; s= default; t=1510850122; x=1512664523; bh=ZyybtxjMCjgZ6iauKw9QoDDr RsSZmIaePZZrfyBMEfQ=; b=jYQtqMuW5tiPO70XwlBnhhoLOsUg0ReJ4YnTwJGQ TE8ni03sUGnjxU56y40vSkQykjMmYcgVJOVbu4FeLQabiigC0rpPpzbNpGZaLy9C y39UC5lwceYu4TliKPueLCcyziLnLazyFxY0gy2+vDUVO4ar0jCSUDd/rF49lVK6 Hn8= X-Virus-Scanned: Debian amavisd-new at web01.jusst.de Received: from web01.jusst.de ([127.0.0.1]) by localhost (web01.jusst.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zQff_nW4w_eV; Thu, 16 Nov 2017 17:35:22 +0100 (CET) Received: from julian-workstation.adnet.avionic-design.de (p3EE0335A.dip0.t-ipconnect.de [62.224.51.90]) (Authenticated sender: julian@jusst.de) by web01.jusst.de (Postfix) with ESMTPSA id E05D71B02CF0; Thu, 16 Nov 2017 17:35:21 +0100 (CET) From: Julian Scheel To: Jaroslav Kysela , Takashi Iwai , Bhumika Goyal , Julian Scheel , Stephen Barber , Con Kolivas , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH] ALSA: usb-audio: uac1: Invalidate ctl on interrupt Date: Thu, 16 Nov 2017 17:35:17 +0100 Message-Id: <20171116163517.5010-1-julian@jusst.de> X-Mailer: git-send-email 2.15.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When an interrupt occurs, the value of at least one of the belonging controls should have changed. To make sure they get re-read from device on the next read, invalidate the cache. This was correctly implemented for uac2 already, but missing for uac1. Signed-off-by: Julian Scheel --- sound/usb/mixer.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 91bc8f18791e..1beb5b4d027e 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -2330,9 +2330,14 @@ void snd_usb_mixer_notify_id(struct usb_mixer_interface *mixer, int unitid) { struct usb_mixer_elem_list *list; - for (list = mixer->id_elems[unitid]; list; list = list->next_id_elem) + for (list = mixer->id_elems[unitid]; list; list = list->next_id_elem) { + struct usb_mixer_elem_info *info = + (struct usb_mixer_elem_info *)list; + /* invalidate cache, so the value is read from the device */ + info->cached = 0; snd_ctl_notify(mixer->chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &list->kctl->id); + } } static void snd_usb_mixer_dump_cval(struct snd_info_buffer *buffer, -- 2.15.0 From 1584733384613485433@xxx Wed Nov 22 02:58:47 +0000 2017 X-GM-THRID: 1584731714805209882 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread