Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2087766ybi; Thu, 4 Jul 2019 05:03:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxPTYtFCd99pqrcsD8DQhtBcVkwhiDO+zgxu6KYgyfSd5fKXl5nlLN0MJCqPDN7EIarxM+g X-Received: by 2002:a17:902:1125:: with SMTP id d34mr48867335pla.40.1562241831450; Thu, 04 Jul 2019 05:03:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562241831; cv=none; d=google.com; s=arc-20160816; b=Aanj2ESjrAIpA00qE21S+LIOVWTO79gUWTbl7y8pwkj7vrFHhwsLkupEigtD9y+eiM ErvatIjLXH5CjCxnG45p20UEQ0mnETiDM+QaoiJ3pYVVUBcJUFiEuJpiLWy2CeMgl9E9 CRmMcn4J2AbWOOtO9LPf1tuR+N6+HE+Pk/m2/2rcu8E3V5f9YC9UnpC1YKqd5kA64Ww8 gdx9arft2RjEvJVLaAG8LgKlu7cqsCUj17mLLVYtJ+3hhhLb/d7zvc1cFIhAMURT8g4U ILRfnDk07DX0N1uj47J+lJjFkJm+S/jfFpAWUNKiZPA+vCZohC+1YSxsWaIiUs6KnTG7 yhYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:message-id:date:thread-index:thread-topic:subject :cc:to:from; bh=maxixXhF3yKw0ZOGNwb3lPiO3XVclaSMVxr7UJoJPUI=; b=inPxfj2Y5pYo5mdoBaGAG2FV5MMTTDs+hNXWx0cpYvKKGjYGvMOcwbq1L92vLPXVBn LED4B08OxXHfkmhncv+F1TN2Q6VoEVPZgW6r1ZK+/Fs7cDP1WgBr/ZTWBjvbt3oELW0C IBCAfKe0zrk++UQf1tnQ0eryIsoP82hBOf0VIZ2ZZrVb2G0rplx8JrX26j6yO4T2Cft2 NQGBmgCsp1+08Wi5OdI8sWqpyKH2i7C3Zj+HUOGwf7LiDOgS5geH0POqqf662zKLOAGT PjmsiHCjg8Ouaq1+7Yw3OjVNzf7eTBWz3GCtelgSZPdgqRHi6cc0sssYe0X7w2ejZJ8W 8mZQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y65si5072018pgd.487.2019.07.04.05.03.33; Thu, 04 Jul 2019 05:03:51 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727623AbfGDMCV convert rfc822-to-8bit (ORCPT + 99 others); Thu, 4 Jul 2019 08:02:21 -0400 Received: from mga05.intel.com ([192.55.52.43]:51504 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727600AbfGDMCV (ORCPT ); Thu, 4 Jul 2019 08:02:21 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jul 2019 05:02:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,451,1557212400"; d="scan'208";a="187560152" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga004.fm.intel.com with ESMTP; 04 Jul 2019 05:02:20 -0700 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 4 Jul 2019 05:02:20 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 4 Jul 2019 05:02:20 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.240]) with mapi id 14.03.0439.000; Thu, 4 Jul 2019 20:02:18 +0800 From: "He, Bo" To: "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" , "hui.wang@canonical.com" Subject: audio lost from speaker after reboot from windows on the device ALC295 Thread-Topic: audio lost from speaker after reboot from windows on the device ALC295 Thread-Index: AdUyX8fMiuN0r83nQWCeaW0Sd+ObdQ== Date: Thu, 4 Jul 2019 12:02:17 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzE4ZTNhZGMtYjQ0NS00OGRmLWJhYjQtZjA5YTdmZDhiMTc2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidFF2MmlOcjU3NmY3VG9Fb3BuMkJnK25uK3VPYWlCa3RcL08xamVKU2o4aEpqUnBlSVNDTlwvbkVWNHAxTUVxOHdEIn0= dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?