[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bsd-nomads:16807] Re: csa(pcm) on ThinkPad A21m



こんにちは、柴田です。
Thu, 29 Jan 2004 19:05:55 JSTに
nabe@nabechan.orgさんは書きました。

>power state が D3 になっているかも知れませんね。
>CS4281 でも同じ症状がありました。
>
>cs4281.c にあるコードまねて、attach() のはじめのほうで D0 にして
>あげれば正しく読めるようになりませんか?

大正解でした。以下のパッチでバッチリです。

--- sys/dev/sound/pci/csa.c	2003/11/08 13:38:28	1.1
+++ sys/dev/sound/pci/csa.c	2004/01/31 00:06:11
@@ -252,6 +252,13 @@
 		stcmd |= (PCIM_CMD_MEMEN | PCIM_CMD_BUSMASTEREN);
 		pci_write_config(dev, PCIR_COMMAND, stcmd, 2);
 	}
+#if 1
+	if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
+		device_printf(dev, "chip is in D%d power mode "
+		              "-- setting to D0\n", pci_get_powerstate(dev));
+		pci_set_powerstate(dev, PCI_POWERSTATE_D0);
+	}
+#endif
 
 	/* Allocate the resources. */
 	resp = &scp->res;
-- 
柴田 千春(♂)      chi@bd.mbn.or.jp    <http://www32.ocn.ne.jp/~chi/>