From owner-freebsd-multimedia@freebsd.org Sun Jul 22 19:25:50 2018 Return-Path: Delivered-To: freebsd-multimedia@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE1EF10537F7 for ; Sun, 22 Jul 2018 19:25:50 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8486B81072 for ; Sun, 22 Jul 2018 19:25:49 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 0F7EF26011E; Sun, 22 Jul 2018 21:25:47 +0200 (CEST) Subject: Re: mixer_info modify_counter To: Ali Abdallah , freebsd-multimedia@freebsd.org References: From: Hans Petter Selasky Message-ID: <76c1ca5f-7a33-51c7-af7b-6e1003b39333@selasky.org> Date: Sun, 22 Jul 2018 21:25:27 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jul 2018 19:25:51 -0000 On 07/22/18 20:08, Ali Abdallah wrote: > Hello, > > Any reason why the modify_counter bit of mixer_info is not incremented when > the mixer gets changed? > >>From sys/dev/sound/pcm/mixer.c:70 > /** > * Counter is incremented when applications change any of this > * mixer's controls. A change in value indicates that persistent > * mixer applications should update their displays. > */ > > But reading the code, it is clear that this is not the case, and the > counter remains 0. It is enough to call m->modify_counter++ in mixer_set on > line 327 for example to make persistent mixer applications work correctly. > Currently they have to poll for all mixer controls, even if no changes were > made to the mixer. > Hi, Can you create a PR and add a patch? --HPS