Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2689009ybi; Thu, 4 Jul 2019 17:12:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxo7BojtmbVbXNLFZriJkk8ogkLag+L4d1Zvq+rM7SaIpljSflhSCYw3WOm9PW/KxBeN4z2 X-Received: by 2002:a17:902:b215:: with SMTP id t21mr954048plr.123.1562285523089; Thu, 04 Jul 2019 17:12:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562285523; cv=none; d=google.com; s=arc-20160816; b=Co5mdEIIvSMC201LeaWmevzaoIERlFibJIYDxcYxYlIiu0KQU/MUqsZMrdXO08Fps+ WvdN6BWZBP7vKA5N85fOBFEsUH4g0PRkyVgB3VVdr0Md92MMuL6fY82El44PIEXFzl/S h5yE6ZdaFl1BfrEmlGNCJKFZmkWxZ0wBZhJGnaRHI8FvIPMtzb+pfiU7HF52CwvnPL+1 l+htRsASIPD97N2uSXF3VGP3a36uz3Q5VCddkTR0lx55yCt33KTIParA7tVciLipyPqu S2owESefekQ2lcn4qUM0uWlfzUC4Ev/anDdA6IwIwmbFuMIzYYJCV/Q1UBlcG/6I+mLE deKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Q5vb9qMgdir9mYhrzKLSWkiF5SJr4sd1tyvr05wAPXo=; b=uyhBSGojp7bBAgLqXtviVtZntnieGJ4Jiy1XIDnYqWVhB3nXkyzn3G9VhHX298UlvI muvchW5aPS0RFgIq7EyGpcccPQ2cvsAEdlXv5hp9tgHjvyHTUOGvw9pnmRGiUH2+wtM3 uUQEGZCz8tHwWbAE3H/JqRTKli4AEzHVZg6eUMRhEZXfSAGXa+LFhANoutGyMqGvlGHT 1Uyx6tkR1zDeOuscwGzpP92u8xBl6tHWzc4Jn5kBB8/EJ/pqjOunBgPspF5OmbB3Tkaz V47tX+jnQIGhmusbZE/5WU8j9pUNxj4y/r2qUkEDtPa+xOqghTF7Gs07vzfK1BSi7hhz L6Ww== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m26si6156685pgv.388.2019.07.04.17.11.34; Thu, 04 Jul 2019 17:12:03 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727053AbfGDX1Q (ORCPT + 99 others); Thu, 4 Jul 2019 19:27:16 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:52984 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbfGDX1Q (ORCPT ); Thu, 4 Jul 2019 19:27:16 -0400 Received: from [114.252.212.168] (helo=[192.168.1.106]) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hjB89-00053a-18; Thu, 04 Jul 2019 23:27:09 +0000 Subject: Re: audio lost from speaker after reboot from windows on the device ALC295 To: "He, Bo" , "kailang@realtek.com" , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" Cc: "perex@perex.cz" , "tiwai@suse.com" , "jian-hong@endlessm.com" , "drake@endlessm.com" , "chiu@endlessm.com" References: From: Hui Wang Message-ID: Date: Fri, 5 Jul 2019 07:27:00 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Maybe your machine has an external amplifier which needs to be set by software before it can work. On 2019/7/4 下午8:02, He, Bo wrote: > Hi, patch_realtek.c maintainer: > I see one issue that reboot from windows and boot to ubuntu, the audio lost from speaker, I suspect there are some bugs in patch_realtek.c drivers, the device is ALC295 and the device id is 0x10ec0295. > > I have done the below experiments: > 1. reboot from windows to windows, the audio is persist . > 2. reboot from windows to ubuntu, the audio lost from speaker, but can hear if I hotplug one earphone. > 3. if the issue reproduce after reboot from windows, reboot the ubuntu can't restore the audio, I suspect it's warm reset. > 4. if I write the port 0xcf9 with 0xe to do cold reset, the audio can restore. > 5. if I do suspend/resume, the audio can restore, I suspect do cold boot and suspend will trigger the platform reset to reset the ALC295. > 6. if I do double function reset (write the verb 0x7ff in alc_init), the audio is still can't restore. > snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_CODEC_RESET, 0); /* Function reset */ > snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_CODEC_RESET, 0); /* double Function reset */ > 7. the issue is first found on kernel 4.19.50, I still see the issue with the latest kernel 5.2-rc2, is it possible windows change some default registers, but ALC295 don't initialize the register? >