LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: <chihhao.chen@mediatek.com>
Cc: <linux-mediatek@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <alsa-devel@alsa-project.org>,
	<damien@zamaudio.com>, <perex@perex.cz>, <tiwai@suse.com>,
	<matthias.bgg@gmail.com>, <wsd_upstream@mediatek.com>
Subject: Re: [PATCH] ALSA: usb-audio: fix incorrect clock source setting
Date: Sat, 24 Jul 2021 10:04:05 +0200	[thread overview]
Message-ID: <s5h7dhgi1e2.wl-tiwai@suse.de> (raw)
In-Reply-To: <1627100621-19225-1-git-send-email-chihhao.chen@mediatek.com>

On Sat, 24 Jul 2021 06:23:41 +0200,
<chihhao.chen@mediatek.com> wrote:
> 
> From: "chihhao.chen" <chihhao.chen@mediatek.com>
> 
> The following scenario describes an echo test for
> Samsung USBC Headset (AKG) with VID/PID (0x04e8/0xa051).
> 
> We first start a capture stream(USB IN transfer) in 96Khz/24bit/1ch mode.
> In clock find source function, we get value 0x2 for clock selector
> and 0x1 for clock source.
> 
> Kernel-4.14 behavior
> Since clock source is valid so clock selector was not set again.
> We pass through this function and start a playback stream(USB OUT transfer)
> in 48Khz/32bit/2ch mode. This time we get value 0x1 for clock selector
> and 0x1 for clock source. Finally clock id with this setting is 0x9.
> 
> Kernel-5.10 behavior
> Clock selector was always set one more time even it is valid.
> When we start a playback stream, we will get 0x2 for clock selector
> and 0x1 for clock source. In this case clock id becomes 0xA.
> This is an incorrect clock source setting and results in severe noises.
> We see wrong data rate in USB IN transfer.
> (From 288 bytes/ms becomes 144 bytes/ms) It should keep in 288 bytes/ms.
> 
> This earphone works fine on older kernel version load because
> this is a newly-added behavior.
> 
> Signed-off-by: chihhao.chen <chihhao.chen@mediatek.com>

Thanks for the patch.

This looks like a regression introduced by the recent commit
d2e8f641257d ("ALSA: usb-audio: Explicitly set up the clock
selector"), which is a fix for certain devices.  Too bad that the
behavior really depends on the device...

Maybe we need to introduce some flag to handle this commonly, but for
now, let's take the fix as is.


Takashi

  reply	other threads:[~2021-07-24  8:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-24  4:23 chihhao.chen
2021-07-24  8:04 ` Takashi Iwai [this message]
2021-07-24 15:04   ` Geraldo Nascimento
2021-07-24 15:20     ` Geraldo Nascimento
2021-07-24 18:42       ` Geraldo Nascimento
2021-07-25  7:44     ` Takashi Iwai
2021-07-26  2:16       ` Geraldo Nascimento
2021-07-26  8:42         ` chihhao chen
2021-07-26 20:57           ` Geraldo Nascimento
2021-07-27 10:27             ` chihhao.chen
2021-07-27 17:56               ` Geraldo Nascimento
2021-07-28  1:19                 ` Geraldo Nascimento
2021-08-05  7:54             ` chihhao.chen
2021-08-05 15:50               ` Geraldo Nascimento
     [not found]                 ` <CAEsQvcvJeAXoVE9FE9vsKNvXMaQYgHZBoPyKfZLT=UA-4BMe_Q@mail.gmail.com>
2021-08-05 22:03                   ` Geraldo Nascimento

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h7dhgi1e2.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=chihhao.chen@mediatek.com \
    --cc=damien@zamaudio.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=wsd_upstream@mediatek.com \
    --subject='Re: [PATCH] ALSA: usb-audio: fix incorrect clock source setting' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).