From: Takashi Iwai Subject: Re: No sound with nVidia Corporation MCP79 High Definition Audio (rev b1) (Macbook Pro 5, 5) Date: Tue, 07 Jul 2009 11:47:26 +0200 Message-ID: References: <4A493A56.1050504@gmail.com> <4A523173.5030100@gmail.com> <200907062214.56736.nutz@unfoog.de> <4A52EA33.1090808@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 9367724691 for ; Tue, 7 Jul 2009 11:47:26 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Sean Burke Cc: Andreas =?ISO-8859-1?Q?N=FC=DFlein?= , alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Tue, 07 Jul 2009 08:38:06 +0200, I wrote: > = > At Tue, 07 Jul 2009 00:24:51 -0600, > Sean Burke wrote: > > = > > Scr=EDobh Takashi Iwai: > > > At Mon, 6 Jul 2009 22:14:56 +0200, > > > Andreas N=FC=DFlein wrote: > > > = > > >> On Monday 06 July 2009 21:26:18 you wrote: > > >> = > > >>> At Mon, 06 Jul 2009 11:16:35 -0600, > > >>> = > > >>> Easy things to test are GPIO bits. Run hda-verb like > > >>> > > >>> hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x0f > > >>> hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x0f > > >>> or > > >>> hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x0f > > >>> hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x0f > > >>> > > >>> etc. CS4206 seems to have 4 GPIO lines, and each bit (0-3) > > >>> corresponds to each GPIO. In many case, GPIO0 or GPIO1 corresponds= to > > >>> the amplifier (EAPD) bit. > > >>> Define the GPIO direction of each GPIO bit by SET_GPIO_DIR, and > > >>> turn on/off the GPIO bits by SET_GPIO_DATA. Running > > >>> hda-verb /dev/snd/hwC0D0 0x01 GET_GPIO_DATA 0 > > >>> will show the current GPIO data bits. Or you can check it in codec= #* > > >>> proc file. > > >>> > > >>> > > >>> Takashi > > >>> = > > >> w000000000000000000000000000000000t! =3D) > > >> > > >> takashi, thank you _so_ much! > > >> > > >> after running all 4 of those: > > >> = > > >>> hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_MASK 0x0f > > >>> hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x0f > > >>> or > > >>> hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x0f > > >>> hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x0f > > >>> > > >>> = > > >> i suddendly had sound!! :D :D :D :D :D :D :D = > > >> only via speakers though - there is no sound via headphones right n= ow. = > > >> > > >> mixer channels: = > > >> - Master (with Mutebutton), PCM and Front (also with Mute) all work = =3D) > > >> - i don't know what surround would do (or it's extra switch) > > >> - headphones-volumes and mute button don't affect the speakers, whic= h is good = > > >> =3D) > > >> > > >> > > >> is there a way to reset what i did with hda-verb, so that i can figu= re out = > > >> which combination it was exactly? > > >> = > > > > > > You can just change the value 0x0f to a different value. > > > At least, you can try commands like > > > hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x01 > > > hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x02 > > > hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x04 > > > hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x08 > > > and check the speaker output at each time. > > > Also, check the GPIO direction, > > > hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x01 > > > hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x01 > > > hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DIR 0x02 > > > hda-verb /dev/snd/hwC0D0 0x01 SET_GPIO_DATA 0x02 > > > ... > > > > > > Regarding the headphone: is the speaker muted when you plug in the > > > headphone? If not, it's likely an issue of the jack detection. If > > > the speaker is muted but no headphone output, it's a missing > > > initialization (or wrong GPIO setup). > > Setting both _DIR and _DATA to 0x08 worked, as did 0x0f. > = > OK, then GPIO2 is EAPD. GPIO3. Anyway, I fixed the latest alsa-driver-unstable tree to work without hda-verb. > > Plugging in > > headphones does not mute the speaker. > = > I'll check this later. I don't figure out the cause yet. Basically, HP output is always on regardless of jack plugging. The jack plugging changes only the pin control of speakers. So, check alsa-info.sh output (or codec#0 proc file) at HP plugged and = unplugged states and compare the files. If you see changes in nodes 0x0a and 0x0b (i.e. Pin-ctls becomes 0x00 from 0x40 at HP plugged), then the driver does the right thing. Only the hardware doesn't respond or ignore it. If nothing changes with HP plugged/unplugged, then either the unsolicited event isn't generated or the jack detection doesn't work. In either way, try to run hda-verb like hda-verb /dev/snd/hw0C0D0 0x0a SET_PIN_WID 0x00 hda-verb /dev/snd/hw0C0D0 0x0b SET_PIN_WID 0x00 and see whether the speaker still works. Takashi