* [PATCH] Asus A6RP and ALC861 headphones problem solved @ 2006-10-08 20:10 mariook 2006-10-09 13:31 ` Takashi Iwai 0 siblings, 1 reply; 10+ messages in thread From: mariook @ 2006-10-08 20:10 UTC (permalink / raw) To: alsa-devel [-- Attachment #1: Type: text/plain, Size: 1933 bytes --] Hi! I finally made it, now can use headphones with my laptop :) My last thread (started on 23 Sep 20:08) about my problem is quite long, so I decided to make a new one with result of my work - patched patch_realtek.c file. The patch I posted least time was good. The only thing that had to be changed is to remove this line: .need_dac_fix = 1, from alc861_presets. With this line of code the patch doesn't want to work. There is only one thing that I'm not sure... When channel mode is changed to 6ch the sound is in built-in speakers, line-in jack and mic jack, but not in hp jack (of course when i plug something to hp jack the sound in built-in speakers disappears). Is that correct? Because each time I make a patch file it doesn't want to work (I make it with this command: diff -Nuar old.file new.file), I'm sending in attachment compressed patch_realtek.c file (I patched final version 1.0.13 of patch_realtek.c). The only important changes are those connected with asus-a6rp model, please ignore changes made in parts of code connected with other models. And one more thing... Defaultly there are some noises in the background, here is the way to disable them (instructions for Gnome): Go to gnome-volume-manager (doubleclick on speaker icon on gnome-panel), go to preferences menu and mark out all positions (make all mixers available), go to tab with mic and line-in mixers and: below line-in and cd-in mixers cross-out speaker and mic icons, below mic mixer cross-out speaker icon and leave not-crossed-out mic icon, below 4th mixer leave icons not-crossed-out. The noise should now disappear and microphones should work :) Is there any way to disable these noises by default? Hope this will be useful for someone :) Mariusz Domanski P.S. If you verify this patch with positive result, please change status of my bug-report to solved: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2320 [-- Attachment #2: patch_realtek.c.tar.bz2 --] [-- Type: application/octet-stream, Size: 26323 bytes --] [-- Attachment #3: Type: text/plain, Size: 348 bytes --] ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV [-- Attachment #4: Type: text/plain, Size: 161 bytes --] _______________________________________________ Alsa-devel mailing list Alsa-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Asus A6RP and ALC861 headphones problem solved 2006-10-08 20:10 [PATCH] Asus A6RP and ALC861 headphones problem solved mariook @ 2006-10-09 13:31 ` Takashi Iwai 2006-10-11 16:36 ` mariook 0 siblings, 1 reply; 10+ messages in thread From: Takashi Iwai @ 2006-10-09 13:31 UTC (permalink / raw) To: mariook; +Cc: alsa-devel At Sun, 8 Oct 2006 22:10:02 +0200, <mariook@wp.pl> wrote: > > Hi! > > I finally made it, now can use headphones with my laptop :) > > My last thread (started on 23 Sep 20:08) about my problem is quite long, so > I decided to make a new one with result of my work - patched patch_realtek.c > file. > > The patch I posted least time was good. The only thing that had to be > changed is to remove this line: > .need_dac_fix = 1, > from alc861_presets. With this line of code the patch doesn't want to work. This implies that the headphone jack is connected to another DAC, most likely the side one (0x04). The right fix would to add .hp_nid = 0x04 in the preset table. If 0x04 doesn't work, try 0x05 or 0x06 instead. > There is only one thing that I'm not sure... > When channel mode is changed to 6ch the sound is in built-in speakers, > line-in jack and mic jack, but not in hp jack (of course when i plug > something to hp jack the sound in built-in speakers disappears). Is that > correct? > > Because each time I make a patch file it doesn't want to work (I make it > with this command: diff -Nuar old.file new.file), I'm sending in attachment > compressed patch_realtek.c file (I patched final version 1.0.13 of > patch_realtek.c). The only important changes are those connected with > asus-a6rp model, please ignore changes made in parts of code connected with > other models. Oh no, please send a patch instead. Otherwise we cannot review and check your changes. What do you mean "it doesn't want to work"? If you changed a single file, you can just create a diff for that file, simply by diff -u orig-alsa-kernel/pci/hda/patch_realtek.c \ new-alsa-kernel/pci/hda/patch_realtek.c Takashi ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Asus A6RP and ALC861 headphones problem solved 2006-10-09 13:31 ` Takashi Iwai @ 2006-10-11 16:36 ` mariook 2006-10-11 16:45 ` Takashi Iwai 0 siblings, 1 reply; 10+ messages in thread From: mariook @ 2006-10-11 16:36 UTC (permalink / raw) To: Takashi Iwai; +Cc: alsa-devel [-- Attachment #1: Type: text/plain, Size: 2416 bytes --] ----- Original Message ----- From: "Takashi Iwai" <tiwai@suse.de> To: <mariook@wp.pl> Cc: <alsa-devel@lists.sourceforge.net> Sent: Monday, October 09, 2006 3:31 PM Subject: Re: [Alsa-devel] [PATCH] Asus A6RP and ALC861 headphones problem solved > At Sun, 8 Oct 2006 22:10:02 +0200, > <mariook@wp.pl> wrote: >> >> Hi! >> >> I finally made it, now can use headphones with my laptop :) >> >> My last thread (started on 23 Sep 20:08) about my problem is quite long, >> so >> I decided to make a new one with result of my work - patched >> patch_realtek.c >> file. >> >> The patch I posted least time was good. The only thing that had to be >> changed is to remove this line: >> .need_dac_fix = 1, >> from alc861_presets. With this line of code the patch doesn't want to >> work. > > This implies that the headphone jack is connected to another DAC, most > likely the side one (0x04). The right fix would to add .hp_nid = 0x04 > in the preset table. If 0x04 doesn't work, try 0x05 or 0x06 instead. .hp_nid = 0x06 worked (as I understood it's surround nid - I wrote earlier that in my case hp jack is surr-out (0x09)) >> There is only one thing that I'm not sure... >> When channel mode is changed to 6ch the sound is in built-in speakers, >> line-in jack and mic jack, but not in hp jack (of course when i plug >> something to hp jack the sound in built-in speakers disappears). Is that >> correct? Even with fix described above this is still a problem - when channel mode is set to 6ch the sound in hp jack is not present (the surround output goes to line-in jack, there is also clfe output in mic jack and no output is in hp jack). >> Because each time I make a patch file it doesn't want to work (I make it >> with this command: diff -Nuar old.file new.file), I'm sending in >> attachment >> compressed patch_realtek.c file (I patched final version 1.0.13 of >> patch_realtek.c). The only important changes are those connected with >> asus-a6rp model, please ignore changes made in parts of code connected >> with >> other models. > > Oh no, please send a patch instead. Otherwise we cannot review and > check your changes. > > What do you mean "it doesn't want to work"? If you changed a single > file, you can just create a diff for that file, simply by > diff -u orig-alsa-kernel/pci/hda/patch_realtek.c \ > new-alsa-kernel/pci/hda/patch_realtek.c Ok, patch is in the attachment :) > Takashi Mariusz [-- Attachment #2: asus-a6rp.patch.tar.bz2 --] [-- Type: application/octet-stream, Size: 2151 bytes --] [-- Attachment #3: Type: text/plain, Size: 373 bytes --] ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 [-- Attachment #4: Type: text/plain, Size: 161 bytes --] _______________________________________________ Alsa-devel mailing list Alsa-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Asus A6RP and ALC861 headphones problem solved 2006-10-11 16:36 ` mariook @ 2006-10-11 16:45 ` Takashi Iwai 2006-10-17 18:56 ` Takashi Iwai 0 siblings, 1 reply; 10+ messages in thread From: Takashi Iwai @ 2006-10-11 16:45 UTC (permalink / raw) To: mariook; +Cc: alsa-devel At Wed, 11 Oct 2006 18:36:02 +0200, <mariook@wp.pl> wrote: > > ----- Original Message ----- > From: "Takashi Iwai" <tiwai@suse.de> > To: <mariook@wp.pl> > Cc: <alsa-devel@lists.sourceforge.net> > Sent: Monday, October 09, 2006 3:31 PM > Subject: Re: [Alsa-devel] [PATCH] Asus A6RP and ALC861 headphones problem > solved > > > At Sun, 8 Oct 2006 22:10:02 +0200, > > <mariook@wp.pl> wrote: > >> > >> Hi! > >> > >> I finally made it, now can use headphones with my laptop :) > >> > >> My last thread (started on 23 Sep 20:08) about my problem is quite long, > >> so > >> I decided to make a new one with result of my work - patched > >> patch_realtek.c > >> file. > >> > >> The patch I posted least time was good. The only thing that had to be > >> changed is to remove this line: > >> .need_dac_fix = 1, > >> from alc861_presets. With this line of code the patch doesn't want to > >> work. > > > > This implies that the headphone jack is connected to another DAC, most > > likely the side one (0x04). The right fix would to add .hp_nid = 0x04 > > in the preset table. If 0x04 doesn't work, try 0x05 or 0x06 instead. > > .hp_nid = 0x06 worked (as I understood it's surround nid - I wrote earlier > that in my case hp jack is surr-out (0x09)) > > >> There is only one thing that I'm not sure... > >> When channel mode is changed to 6ch the sound is in built-in speakers, > >> line-in jack and mic jack, but not in hp jack (of course when i plug > >> something to hp jack the sound in built-in speakers disappears). Is that > >> correct? > > Even with fix described above this is still a problem - when channel mode is > set to 6ch the sound in hp jack is not present (the surround output goes to > line-in jack, there is also clfe output in mic jack and no output is in hp > jack). The stream is set up to hp_nid (0x06) too, regardless of the channel mode. You can confirm this by compiling with --with-debug=detect option that will show more debug messages. So, it shouldn't be the problem of hp_nid but others. If the no sound comes out, it means either pin is reset to input, or a volume is muted in the route to DAC 0x06 -> hp-jack. Check /proc/asound/card0/codec#* after ch6 mode. You can comapre the status with ch6 mode, too, by simply diffing codec#* dumps in the different states. > >> Because each time I make a patch file it doesn't want to work (I make it > >> with this command: diff -Nuar old.file new.file), I'm sending in > >> attachment > >> compressed patch_realtek.c file (I patched final version 1.0.13 of > >> patch_realtek.c). The only important changes are those connected with > >> asus-a6rp model, please ignore changes made in parts of code connected > >> with > >> other models. > > > > Oh no, please send a patch instead. Otherwise we cannot review and > > check your changes. > > > > What do you mean "it doesn't want to work"? If you changed a single > > file, you can just create a diff for that file, simply by > > diff -u orig-alsa-kernel/pci/hda/patch_realtek.c \ > > new-alsa-kernel/pci/hda/patch_realtek.c > > Ok, patch is in the attachment :) Thanks, but an uncompressed file would be more appreciated :) Takashi ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Asus A6RP and ALC861 headphones problem solved 2006-10-11 16:45 ` Takashi Iwai @ 2006-10-17 18:56 ` Takashi Iwai 2006-10-19 22:10 ` mariook 0 siblings, 1 reply; 10+ messages in thread From: Takashi Iwai @ 2006-10-17 18:56 UTC (permalink / raw) To: mariook; +Cc: alsa-devel At Wed, 11 Oct 2006 18:45:52 +0200, I wrote: > > At Wed, 11 Oct 2006 18:36:02 +0200, > <mariook@wp.pl> wrote: > > > > ----- Original Message ----- > > From: "Takashi Iwai" <tiwai@suse.de> > > To: <mariook@wp.pl> > > Cc: <alsa-devel@lists.sourceforge.net> > > Sent: Monday, October 09, 2006 3:31 PM > > Subject: Re: [Alsa-devel] [PATCH] Asus A6RP and ALC861 headphones problem > > solved > > > > > At Sun, 8 Oct 2006 22:10:02 +0200, > > > <mariook@wp.pl> wrote: > > >> > > >> Hi! > > >> > > >> I finally made it, now can use headphones with my laptop :) > > >> > > >> My last thread (started on 23 Sep 20:08) about my problem is quite long, > > >> so > > >> I decided to make a new one with result of my work - patched > > >> patch_realtek.c > > >> file. > > >> > > >> The patch I posted least time was good. The only thing that had to be > > >> changed is to remove this line: > > >> .need_dac_fix = 1, > > >> from alc861_presets. With this line of code the patch doesn't want to > > >> work. > > > > > > This implies that the headphone jack is connected to another DAC, most > > > likely the side one (0x04). The right fix would to add .hp_nid = 0x04 > > > in the preset table. If 0x04 doesn't work, try 0x05 or 0x06 instead. > > > > .hp_nid = 0x06 worked (as I understood it's surround nid - I wrote earlier > > that in my case hp jack is surr-out (0x09)) > > > > >> There is only one thing that I'm not sure... > > >> When channel mode is changed to 6ch the sound is in built-in speakers, > > >> line-in jack and mic jack, but not in hp jack (of course when i plug > > >> something to hp jack the sound in built-in speakers disappears). Is that > > >> correct? > > > > Even with fix described above this is still a problem - when channel mode is > > set to 6ch the sound in hp jack is not present (the surround output goes to > > line-in jack, there is also clfe output in mic jack and no output is in hp > > jack). > > The stream is set up to hp_nid (0x06) too, regardless of the > channel mode. You can confirm this by compiling with > --with-debug=detect option that will show more debug messages. > So, it shouldn't be the problem of hp_nid but others. > > If the no sound comes out, it means either pin is reset to input, or > a volume is muted in the route to DAC 0x06 -> hp-jack. Check > /proc/asound/card0/codec#* after ch6 mode. You can comapre the status > with ch6 mode, too, by simply diffing codec#* dumps in the different > states. I still wonder whether the HP output works on 6-channel mode if you remove .need_dac_fix = 1 in the preset... > > > >> Because each time I make a patch file it doesn't want to work (I make it > > >> with this command: diff -Nuar old.file new.file), I'm sending in > > >> attachment > > >> compressed patch_realtek.c file (I patched final version 1.0.13 of > > >> patch_realtek.c). The only important changes are those connected with > > >> asus-a6rp model, please ignore changes made in parts of code connected > > >> with > > >> other models. > > > > > > Oh no, please send a patch instead. Otherwise we cannot review and > > > check your changes. > > > > > > What do you mean "it doesn't want to work"? If you changed a single > > > file, you can just create a diff for that file, simply by > > > diff -u orig-alsa-kernel/pci/hda/patch_realtek.c \ > > > new-alsa-kernel/pci/hda/patch_realtek.c > > > > Ok, patch is in the attachment :) > > Thanks, but an uncompressed file would be more appreciated :) I checked the patch now and it looks good. Could you give a proper summary, changelog and signed-off-by line for committing to the upstream? The remaining small issues can be fixed later, too. Thanks, Takashi ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Asus A6RP and ALC861 headphones problem solved 2006-10-17 18:56 ` Takashi Iwai @ 2006-10-19 22:10 ` mariook 2006-10-19 23:39 ` Tobin Davis 0 siblings, 1 reply; 10+ messages in thread From: mariook @ 2006-10-19 22:10 UTC (permalink / raw) To: Takashi Iwai; +Cc: alsa-devel ----- Original Message ----- From: "Takashi Iwai" <tiwai@suse.de> To: <mariook@wp.pl> Cc: <alsa-devel@lists.sourceforge.net> Sent: Tuesday, October 17, 2006 8:56 PM Subject: Re: [Alsa-devel] [PATCH] Asus A6RP and ALC861 headphones problem solved > At Wed, 11 Oct 2006 18:45:52 +0200, > I wrote: >> >> At Wed, 11 Oct 2006 18:36:02 +0200, >> <mariook@wp.pl> wrote: >> > >> > ----- Original Message ----- >> > From: "Takashi Iwai" <tiwai@suse.de> >> > To: <mariook@wp.pl> >> > Cc: <alsa-devel@lists.sourceforge.net> >> > Sent: Monday, October 09, 2006 3:31 PM >> > Subject: Re: [Alsa-devel] [PATCH] Asus A6RP and ALC861 headphones >> > problem >> > solved >> > >> > > At Sun, 8 Oct 2006 22:10:02 +0200, >> > > <mariook@wp.pl> wrote: >> > >> >> > >> Hi! >> > >> >> > >> I finally made it, now can use headphones with my laptop :) >> > >> >> > >> My last thread (started on 23 Sep 20:08) about my problem is quite >> > >> long, >> > >> so >> > >> I decided to make a new one with result of my work - patched >> > >> patch_realtek.c >> > >> file. >> > >> >> > >> The patch I posted least time was good. The only thing that had to >> > >> be >> > >> changed is to remove this line: >> > >> .need_dac_fix = 1, >> > >> from alc861_presets. With this line of code the patch doesn't want >> > >> to >> > >> work. >> > > >> > > This implies that the headphone jack is connected to another DAC, >> > > most >> > > likely the side one (0x04). The right fix would to add .hp_nid = >> > > 0x04 >> > > in the preset table. If 0x04 doesn't work, try 0x05 or 0x06 instead. >> > >> > .hp_nid = 0x06 worked (as I understood it's surround nid - I wrote >> > earlier >> > that in my case hp jack is surr-out (0x09)) >> > >> > >> There is only one thing that I'm not sure... >> > >> When channel mode is changed to 6ch the sound is in built-in >> > >> speakers, >> > >> line-in jack and mic jack, but not in hp jack (of course when i plug >> > >> something to hp jack the sound in built-in speakers disappears). Is >> > >> that >> > >> correct? >> > >> > Even with fix described above this is still a problem - when channel >> > mode is >> > set to 6ch the sound in hp jack is not present (the surround output >> > goes to >> > line-in jack, there is also clfe output in mic jack and no output is in >> > hp >> > jack). >> >> The stream is set up to hp_nid (0x06) too, regardless of the >> channel mode. You can confirm this by compiling with >> --with-debug=detect option that will show more debug messages. >> So, it shouldn't be the problem of hp_nid but others. >> >> If the no sound comes out, it means either pin is reset to input, or >> a volume is muted in the route to DAC 0x06 -> hp-jack. Check >> /proc/asound/card0/codec#* after ch6 mode. You can comapre the status >> with ch6 mode, too, by simply diffing codec#* dumps in the different >> states. > > I still wonder whether the HP output works on 6-channel mode if you > remove .need_dac_fix = 1 in the preset... As far as I remember it didn't work... >> > >> Because each time I make a patch file it doesn't want to work (I >> > >> make it >> > >> with this command: diff -Nuar old.file new.file), I'm sending in >> > >> attachment >> > >> compressed patch_realtek.c file (I patched final version 1.0.13 of >> > >> patch_realtek.c). The only important changes are those connected >> > >> with >> > >> asus-a6rp model, please ignore changes made in parts of code >> > >> connected >> > >> with >> > >> other models. >> > > >> > > Oh no, please send a patch instead. Otherwise we cannot review and >> > > check your changes. >> > > >> > > What do you mean "it doesn't want to work"? If you changed a single >> > > file, you can just create a diff for that file, simply by >> > > diff -u orig-alsa-kernel/pci/hda/patch_realtek.c \ >> > > new-alsa-kernel/pci/hda/patch_realtek.c >> > >> > Ok, patch is in the attachment :) >> >> Thanks, but an uncompressed file would be more appreciated :) > > I checked the patch now and it looks good. > > Could you give a proper summary, changelog and signed-off-by line for > committing to the upstream? The remaining small issues can be fixed > later, too. Sorry but I don't understand, what changelog? Everything I have changed is in patch file. The problem was with 3 things: 1) the hp jack is 0x09 not 0x0f (0x0f has to be set to vref) 2) hp_nid was wrong, it has to be set to 0x06 3) in 6ch mode surround output (hp jack output) 'jumps' to line-in jack, leaving no output in hp jack What else should I write? > Thanks, > > Takashi > Thanks, Mariusz ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Asus A6RP and ALC861 headphones problem solved 2006-10-19 22:10 ` mariook @ 2006-10-19 23:39 ` Tobin Davis 2006-10-20 13:33 ` Takashi Iwai 0 siblings, 1 reply; 10+ messages in thread From: Tobin Davis @ 2006-10-19 23:39 UTC (permalink / raw) To: mariook; +Cc: Takashi Iwai, alsa-devel [-- Attachment #1: Type: text/plain, Size: 6217 bytes --] What Takashi needs is a summary and description for the repository. Here's an example from one of my patches: Summery: hda-codec - Add toshiba model to ALC861 codec This patch adds support for Toshiba laptops. Code is from RealTek's alsa-driver-1.0.12-4.05b tree. Signed-off-by: Tobin Davis <tdavis@dsl-only.net> Also, I made a minor revision to your patch, changing it from asus_a6rp to just asus. I have been working on a similar patch for another Asus Laptop (F3J), and if this works for them, great (otherwise I'm back to square one). Still, better to be more generic than model specific. Leave the model specific details for the config table array. Attached are my changes. Tobin On Fri, 2006-10-20 at 00:10 +0200, mariook@wp.pl wrote: > ----- Original Message ----- > From: "Takashi Iwai" <tiwai@suse.de> > To: <mariook@wp.pl> > Cc: <alsa-devel@lists.sourceforge.net> > Sent: Tuesday, October 17, 2006 8:56 PM > Subject: Re: [Alsa-devel] [PATCH] Asus A6RP and ALC861 headphones problem > solved > > > > At Wed, 11 Oct 2006 18:45:52 +0200, > > I wrote: > >> > >> At Wed, 11 Oct 2006 18:36:02 +0200, > >> <mariook@wp.pl> wrote: > >> > > >> > ----- Original Message ----- > >> > From: "Takashi Iwai" <tiwai@suse.de> > >> > To: <mariook@wp.pl> > >> > Cc: <alsa-devel@lists.sourceforge.net> > >> > Sent: Monday, October 09, 2006 3:31 PM > >> > Subject: Re: [Alsa-devel] [PATCH] Asus A6RP and ALC861 headphones > >> > problem > >> > solved > >> > > >> > > At Sun, 8 Oct 2006 22:10:02 +0200, > >> > > <mariook@wp.pl> wrote: > >> > >> > >> > >> Hi! > >> > >> > >> > >> I finally made it, now can use headphones with my laptop :) > >> > >> > >> > >> My last thread (started on 23 Sep 20:08) about my problem is quite > >> > >> long, > >> > >> so > >> > >> I decided to make a new one with result of my work - patched > >> > >> patch_realtek.c > >> > >> file. > >> > >> > >> > >> The patch I posted least time was good. The only thing that had to > >> > >> be > >> > >> changed is to remove this line: > >> > >> .need_dac_fix = 1, > >> > >> from alc861_presets. With this line of code the patch doesn't want > >> > >> to > >> > >> work. > >> > > > >> > > This implies that the headphone jack is connected to another DAC, > >> > > most > >> > > likely the side one (0x04). The right fix would to add .hp_nid = > >> > > 0x04 > >> > > in the preset table. If 0x04 doesn't work, try 0x05 or 0x06 instead. > >> > > >> > .hp_nid = 0x06 worked (as I understood it's surround nid - I wrote > >> > earlier > >> > that in my case hp jack is surr-out (0x09)) > >> > > >> > >> There is only one thing that I'm not sure... > >> > >> When channel mode is changed to 6ch the sound is in built-in > >> > >> speakers, > >> > >> line-in jack and mic jack, but not in hp jack (of course when i plug > >> > >> something to hp jack the sound in built-in speakers disappears). Is > >> > >> that > >> > >> correct? > >> > > >> > Even with fix described above this is still a problem - when channel > >> > mode is > >> > set to 6ch the sound in hp jack is not present (the surround output > >> > goes to > >> > line-in jack, there is also clfe output in mic jack and no output is in > >> > hp > >> > jack). > >> > >> The stream is set up to hp_nid (0x06) too, regardless of the > >> channel mode. You can confirm this by compiling with > >> --with-debug=detect option that will show more debug messages. > >> So, it shouldn't be the problem of hp_nid but others. > >> > >> If the no sound comes out, it means either pin is reset to input, or > >> a volume is muted in the route to DAC 0x06 -> hp-jack. Check > >> /proc/asound/card0/codec#* after ch6 mode. You can comapre the status > >> with ch6 mode, too, by simply diffing codec#* dumps in the different > >> states. > > > > I still wonder whether the HP output works on 6-channel mode if you > > remove .need_dac_fix = 1 in the preset... > > As far as I remember it didn't work... > > >> > >> Because each time I make a patch file it doesn't want to work (I > >> > >> make it > >> > >> with this command: diff -Nuar old.file new.file), I'm sending in > >> > >> attachment > >> > >> compressed patch_realtek.c file (I patched final version 1.0.13 of > >> > >> patch_realtek.c). The only important changes are those connected > >> > >> with > >> > >> asus-a6rp model, please ignore changes made in parts of code > >> > >> connected > >> > >> with > >> > >> other models. > >> > > > >> > > Oh no, please send a patch instead. Otherwise we cannot review and > >> > > check your changes. > >> > > > >> > > What do you mean "it doesn't want to work"? If you changed a single > >> > > file, you can just create a diff for that file, simply by > >> > > diff -u orig-alsa-kernel/pci/hda/patch_realtek.c \ > >> > > new-alsa-kernel/pci/hda/patch_realtek.c > >> > > >> > Ok, patch is in the attachment :) > >> > >> Thanks, but an uncompressed file would be more appreciated :) > > > > I checked the patch now and it looks good. > > > > Could you give a proper summary, changelog and signed-off-by line for > > committing to the upstream? The remaining small issues can be fixed > > later, too. > > Sorry but I don't understand, what changelog? Everything I have changed is > in patch file. > The problem was with 3 things: > 1) the hp jack is 0x09 not 0x0f (0x0f has to be set to vref) > 2) hp_nid was wrong, it has to be set to 0x06 > 3) in 6ch mode surround output (hp jack output) 'jumps' to line-in jack, > leaving no output in hp jack > What else should I write? > > > Thanks, > > > > Takashi > > > > Thanks, > Mariusz > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/alsa-devel -- Tobin Davis <tdavis@dsl-only.net> [-- Attachment #2: asus.patch --] [-- Type: text/x-patch, Size: 7999 bytes --] diff -r d7fe584f7395 pci/hda/patch_realtek.c --- a/pci/hda/patch_realtek.c Thu Oct 19 20:35:56 2006 +0200 +++ b/pci/hda/patch_realtek.c Thu Oct 19 16:31:24 2006 -0700 @@ -100,6 +100,7 @@ enum { ALC861_6ST_DIG, ALC861_UNIWILL_M31, ALC861_TOSHIBA, + ALC861_ASUS. ALC861_AUTO, ALC861_MODEL_LAST, }; @@ -6650,6 +6651,44 @@ static struct hda_channel_mode alc861_un { 4, alc861_uniwill_m31_ch4_init }, }; +/* Set mic1 and line-in as input and unmute the mixer */ +static struct hda_verb alc861_asus_ch2_init[] = { + /* set pin widget 1Ah (line in) for input */ + { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, + /* set pin widget 18h (mic1/2) for input, for mic also enable the vref */ + { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb00c }, +#if 0 + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8)) }, /*mic*/ + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8)) }, /*line-in*/ +#endif + { } /* end */ +}; +/* Set mic1 nad line-in as output and mute mixer */ +static struct hda_verb alc861_asus_ch6_init[] = { + /* set pin widget 1Ah (line in) for output (Back Surround)*/ + { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + /* { 0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, */ + /* set pin widget 18h (mic1) for output (CLFE)*/ + { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + /* { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, */ + { 0x0c, AC_VERB_SET_CONNECT_SEL, 0x00 }, + { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00 }, + + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080 }, +#if 0 + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x01 << 8)) }, /*mic*/ + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8)) }, /*line in*/ +#endif + { } /* end */ +}; + +static struct hda_channel_mode alc861_asus_modes[2] = { + { 2, alc861_asus_ch2_init }, + { 6, alc861_asus_ch6_init }, +}; + /* patch-ALC861 */ static struct snd_kcontrol_new alc861_base_mixer[] = { @@ -6789,6 +6828,48 @@ static struct snd_kcontrol_new alc861_un .private_value = ARRAY_SIZE(alc861_uniwill_m31_modes), }, { } /* end */ +}; + +static struct snd_kcontrol_new alc861_asus_mixer[] = { + /* output mixer control */ + HDA_CODEC_MUTE("Front Playback Switch", 0x03, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Surround Playback Switch", 0x06, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x05, 1, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x05, 2, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Side Playback Switch", 0x04, 0x0, HDA_OUTPUT), + + /* Input mixer control */ + HDA_CODEC_VOLUME("Input Playback Volume", 0x15, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Input Playback Switch", 0x15, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("CD Playback Volume", 0x15, 0x0, HDA_INPUT), + HDA_CODEC_MUTE("CD Playback Switch", 0x15, 0x0, HDA_INPUT), + HDA_CODEC_VOLUME("Line Playback Volume", 0x15, 0x02, HDA_INPUT), + HDA_CODEC_MUTE("Line Playback Switch", 0x15, 0x02, HDA_INPUT), + HDA_CODEC_VOLUME("Mic Playback Volume", 0x15, 0x01, HDA_INPUT), + HDA_CODEC_MUTE("Mic Playback Switch", 0x15, 0x01, HDA_INPUT), + HDA_CODEC_MUTE("Front Mic Playback Switch", 0x10, 0x01, HDA_OUTPUT), + HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x03, HDA_OUTPUT), /* was HDA_INPUT (why?) */ + + /* Capture mixer control */ + HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), + HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Capture Source", + .count = 1, + .info = alc_mux_enum_info, + .get = alc_mux_enum_get, + .put = alc_mux_enum_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Channel Mode", + .info = alc_ch_mode_info, + .get = alc_ch_mode_get, + .put = alc_ch_mode_put, + .private_value = ARRAY_SIZE(alc861_asus_modes), + }, + { } }; /* @@ -6979,6 +7060,67 @@ static struct hda_verb alc861_uniwill_m3 { } }; +static struct hda_verb alc861_asus_init_verbs[] = { + /* + * Unmute ADC0 and set the default input to mic-in + */ + /* port-A for surround (rear panel) | according to codec#0 this is the HP jack*/ + { 0x0e, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 }, /* was 0x00 */ + /* route front PCM to HP */ + { 0x0e, AC_VERB_SET_CONNECT_SEL, 0x01 }, + /* port-B for mic-in (rear panel) with vref */ + { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + /* port-C for line-in (rear panel) */ + { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, + /* port-D for Front */ + { 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + { 0x0b, AC_VERB_SET_CONNECT_SEL, 0x00 }, + /* port-E for HP out (front panel) */ + { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, /* this has to be set to VREF80 */ + /* route front PCM to HP */ + { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x01 }, + /* port-F for mic-in (front panel) with vref */ + { 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + /* port-G for CLFE (rear panel) */ + { 0x1f, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + /* port-H for side (rear panel) */ + { 0x20, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + /* CD-in */ + { 0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, + /* route front mic to ADC1*/ + {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, + {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + /* Unmute DAC0~3 & spdif out*/ + {0x03, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x06, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + /* Unmute Mixer 14 (mic) 1c (Line in)*/ + {0x014, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x014, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x01c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x01c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + + /* Unmute Stereo Mixer 15 */ + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb00c }, /* Output 0~12 step */ + + {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)}, /* hp used DAC 3 (Front) */ + {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, + { } +}; + /* * generic initialization of ADC, input mixers and output mixers */ @@ -7350,10 +7492,12 @@ static struct hda_board_config alc861_cf { .pci_subvendor = 0x1584, .pci_subdevice = 0x9072, .config = ALC861_UNIWILL_M31 }, { .modelname = "toshiba", .config = ALC861_TOSHIBA }, - { .pci_subvendor = 0x1043, .pci_subdevice = 0x1338, - .config = ALC861_TOSHIBA }, { .pci_subvendor = 0x1179, .pci_subdevice = 0xff10, .config = ALC861_TOSHIBA }, + { .pci_subvendor = 0x1043, .pci_subdevice = 0x1338, + .config = ALC861_ASUS }, + { .pci_subvendor = 0x1043, .pci_subdevice = 0x1393, + .config = ALC861_ASUS }, { .modelname = "auto", .config = ALC861_AUTO }, {} }; @@ -7434,6 +7578,20 @@ static struct alc_config_preset alc861_p .unsol_event = alc861_toshiba_unsol_event, .init_hook = alc861_toshiba_automute, }, + [ALC861_ASUS] = { + .mixers = { alc861_asus_mixer }, + .init_verbs = { alc861_asus_init_verbs }, + .num_dacs = ARRAY_SIZE(alc861_dac_nids), + .dac_nids = alc861_dac_nids, + .dig_out_nid = ALC861_DIGOUT_NID, + .num_channel_mode = ARRAY_SIZE(alc861_asus_modes), + .channel_mode = alc861_asus_modes, + .need_dac_fix = 1, + .hp_nid = 0x06, + .num_adc_nids = ARRAY_SIZE(alc861_adc_nids), + .adc_nids = alc861_adc_nids, + .input_mux = &alc861_capture_source, + }, }; [-- Attachment #3: Type: text/plain, Size: 373 bytes --] ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 [-- Attachment #4: Type: text/plain, Size: 161 bytes --] _______________________________________________ Alsa-devel mailing list Alsa-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Asus A6RP and ALC861 headphones problem solved 2006-10-19 23:39 ` Tobin Davis @ 2006-10-20 13:33 ` Takashi Iwai 2006-10-20 20:21 ` mariook 0 siblings, 1 reply; 10+ messages in thread From: Takashi Iwai @ 2006-10-20 13:33 UTC (permalink / raw) To: Tobin Davis; +Cc: mariook, alsa-devel At Thu, 19 Oct 2006 16:39:10 -0700, Tobin Davis wrote: > > What Takashi needs is a summary and description for the repository. > Here's an example from one of my patches: > > Summery: hda-codec - Add toshiba model to ALC861 codec > > This patch adds support for Toshiba laptops. Code is from > RealTek's alsa-driver-1.0.12-4.05b tree. > > Signed-off-by: Tobin Davis <tdavis@dsl-only.net> Yep, exactly. > Also, I made a minor revision to your patch, changing it from asus_a6rp > to just asus. I have been working on a similar patch for another Asus > Laptop (F3J), and if this works for them, great (otherwise I'm back to > square one). Still, better to be more generic than model specific. > Leave the model specific details for the config table array. Attached > are my changes. Don't forget to add an entry with modelname="asus", and change ALSA-Configuration.txt appropriately, too. Thanks, Takashi ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Asus A6RP and ALC861 headphones problem solved 2006-10-20 13:33 ` Takashi Iwai @ 2006-10-20 20:21 ` mariook 2006-10-23 12:11 ` Takashi Iwai 0 siblings, 1 reply; 10+ messages in thread From: mariook @ 2006-10-20 20:21 UTC (permalink / raw) To: Takashi Iwai, Tobin Davis; +Cc: alsa-devel [-- Attachment #1: Type: text/plain, Size: 1767 bytes --] ----- Original Message ----- From: "Takashi Iwai" <tiwai@suse.de> To: "Tobin Davis" <tdavis@dsl-only.net> Cc: <mariook@wp.pl>; <alsa-devel@lists.sourceforge.net> Sent: Friday, October 20, 2006 3:33 PM Subject: Re: [Alsa-devel] [PATCH] Asus A6RP and ALC861 headphones problem solved > At Thu, 19 Oct 2006 16:39:10 -0700, > Tobin Davis wrote: >> >> What Takashi needs is a summary and description for the repository. >> Here's an example from one of my patches: >> >> Summery: hda-codec - Add toshiba model to ALC861 codec >> >> This patch adds support for Toshiba laptops. Code is from >> RealTek's alsa-driver-1.0.12-4.05b tree. >> >> Signed-off-by: Tobin Davis <tdavis@dsl-only.net> > > Yep, exactly. > >> Also, I made a minor revision to your patch, changing it from asus_a6rp >> to just asus. I have been working on a similar patch for another Asus >> Laptop (F3J), and if this works for them, great (otherwise I'm back to >> square one). Still, better to be more generic than model specific. >> Leave the model specific details for the config table array. Attached >> are my changes. > > Don't forget to add an entry with modelname="asus", and change > ALSA-Configuration.txt appropriately, too. > > > Thanks, > > Takashi Ok, so here it is :) Summary: hda-codec - Add asus model to ALC861 codec This patch adds support for Asus laptops (for example: Asus A6Rp-AP002). Signed-off-by: Mariusz Domanski <mariook@wp.pl> I modified patch_realtek.c from the newest hg tree and made asus.patch basing on it (also included change made by Tobin - pci_subdevice for another asus laptop). I also modified the newest ALSA-Configuration.txt and made patch. Patches are in the attachment. Thanks, Mariusz [-- Attachment #2: asus.patch --] [-- Type: application/octet-stream, Size: 8000 bytes --] --- patch_realtek.c 2006-10-20 20:58:06.000000000 +0200 +++ alsa-kernel/pci/hda/patch_realtek.c 2006-10-20 21:17:27.000000000 +0200 @@ -100,6 +100,7 @@ ALC861_6ST_DIG, ALC861_UNIWILL_M31, ALC861_TOSHIBA, + ALC861_ASUS, ALC861_AUTO, ALC861_MODEL_LAST, }; @@ -6650,6 +6651,44 @@ { 4, alc861_uniwill_m31_ch4_init }, }; +/* Set mic1 and line-in as input and unmute the mixer */ +static struct hda_verb alc861_asus_ch2_init[] = { + /* set pin widget 1Ah (line in) for input */ + { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, + /* set pin widget 18h (mic1/2) for input, for mic also enable the vref */ + { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb00c }, +#if 0 + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8)) }, /*mic*/ + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x02 << 8)) }, /*line-in*/ +#endif + { } /* end */ +}; +/* Set mic1 nad line-in as output and mute mixer */ +static struct hda_verb alc861_asus_ch6_init[] = { + /* set pin widget 1Ah (line in) for output (Back Surround)*/ + { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + /* { 0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, */ + /* set pin widget 18h (mic1) for output (CLFE)*/ + { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + /* { 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE }, */ + { 0x0c, AC_VERB_SET_CONNECT_SEL, 0x00 }, + { 0x0d, AC_VERB_SET_CONNECT_SEL, 0x00 }, + + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb080 }, +#if 0 + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x01 << 8)) }, /*mic*/ + { 0x15, AC_VERB_SET_AMP_GAIN_MUTE, (0x7080 | (0x02 << 8)) }, /*line in*/ +#endif + { } /* end */ +}; + +static struct hda_channel_mode alc861_asus_modes[2] = { + { 2, alc861_asus_ch2_init }, + { 6, alc861_asus_ch6_init }, +}; + /* patch-ALC861 */ static struct snd_kcontrol_new alc861_base_mixer[] = { @@ -6790,6 +6829,49 @@ }, { } /* end */ }; + +static struct snd_kcontrol_new alc861_asus_mixer[] = { + /* output mixer control */ + HDA_CODEC_MUTE("Front Playback Switch", 0x03, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Surround Playback Switch", 0x06, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x05, 1, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x05, 2, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Side Playback Switch", 0x04, 0x0, HDA_OUTPUT), + + /* Input mixer control */ + HDA_CODEC_VOLUME("Input Playback Volume", 0x15, 0x0, HDA_OUTPUT), + HDA_CODEC_MUTE("Input Playback Switch", 0x15, 0x0, HDA_OUTPUT), + HDA_CODEC_VOLUME("CD Playback Volume", 0x15, 0x0, HDA_INPUT), + HDA_CODEC_MUTE("CD Playback Switch", 0x15, 0x0, HDA_INPUT), + HDA_CODEC_VOLUME("Line Playback Volume", 0x15, 0x02, HDA_INPUT), + HDA_CODEC_MUTE("Line Playback Switch", 0x15, 0x02, HDA_INPUT), + HDA_CODEC_VOLUME("Mic Playback Volume", 0x15, 0x01, HDA_INPUT), + HDA_CODEC_MUTE("Mic Playback Switch", 0x15, 0x01, HDA_INPUT), + HDA_CODEC_MUTE("Front Mic Playback Switch", 0x10, 0x01, HDA_OUTPUT), + HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x03, HDA_OUTPUT), /* was HDA_INPUT (why?) */ + + /* Capture mixer control */ + HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT), + HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT), + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Capture Source", + .count = 1, + .info = alc_mux_enum_info, + .get = alc_mux_enum_get, + .put = alc_mux_enum_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Channel Mode", + .info = alc_ch_mode_info, + .get = alc_ch_mode_get, + .put = alc_ch_mode_put, + .private_value = ARRAY_SIZE(alc861_asus_modes), + }, + { } +}; + /* * generic initialization of ADC, input mixers and output mixers @@ -6979,6 +7061,68 @@ { } }; +static struct hda_verb alc861_asus_init_verbs[] = { + /* + * Unmute ADC0 and set the default input to mic-in + */ + /* port-A for surround (rear panel) | according to codec#0 this is the HP jack*/ + { 0x0e, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0 }, /* was 0x00 */ + /* route front PCM to HP */ + { 0x0e, AC_VERB_SET_CONNECT_SEL, 0x01 }, + /* port-B for mic-in (rear panel) with vref */ + { 0x0d, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + /* port-C for line-in (rear panel) */ + { 0x0c, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, + /* port-D for Front */ + { 0x0b, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + { 0x0b, AC_VERB_SET_CONNECT_SEL, 0x00 }, + /* port-E for HP out (front panel) */ + { 0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, /* this has to be set to VREF80 */ + /* route front PCM to HP */ + { 0x0f, AC_VERB_SET_CONNECT_SEL, 0x01 }, + /* port-F for mic-in (front panel) with vref */ + { 0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24 }, + /* port-G for CLFE (rear panel) */ + { 0x1f, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + /* port-H for side (rear panel) */ + { 0x20, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40 }, + /* CD-in */ + { 0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20 }, + /* route front mic to ADC1*/ + {0x08, AC_VERB_SET_CONNECT_SEL, 0x00}, + {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + /* Unmute DAC0~3 & spdif out*/ + {0x03, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x06, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, + /* Unmute Mixer 14 (mic) 1c (Line in)*/ + {0x014, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x014, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x01c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x01c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + + /* Unmute Stereo Mixer 15 */ + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, + {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0xb00c }, /* Output 0~12 step */ + + {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)}, + {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)}, + {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)}, /* hp used DAC 3 (Front) */ + {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)}, + { } +}; + + /* * generic initialization of ADC, input mixers and output mixers */ @@ -7350,10 +7494,13 @@ { .pci_subvendor = 0x1584, .pci_subdevice = 0x9072, .config = ALC861_UNIWILL_M31 }, { .modelname = "toshiba", .config = ALC861_TOSHIBA }, - { .pci_subvendor = 0x1043, .pci_subdevice = 0x1338, - .config = ALC861_TOSHIBA }, { .pci_subvendor = 0x1179, .pci_subdevice = 0xff10, .config = ALC861_TOSHIBA }, + { .modelname = "asus", .config = ALC861_ASUS}, + { .pci_subvendor = 0x1043, .pci_subdevice = 0x1393, + .config = ALC861_ASUS }, + { .pci_subvendor = 0x1043, .pci_subdevice = 0x1338, + .config = ALC861_ASUS }, { .modelname = "auto", .config = ALC861_AUTO }, {} }; @@ -7434,6 +7581,20 @@ .unsol_event = alc861_toshiba_unsol_event, .init_hook = alc861_toshiba_automute, }, + [ALC861_ASUS] = { + .mixers = { alc861_asus_mixer }, + .init_verbs = { alc861_asus_init_verbs }, + .num_dacs = ARRAY_SIZE(alc861_dac_nids), + .dac_nids = alc861_dac_nids, + .dig_out_nid = ALC861_DIGOUT_NID, + .num_channel_mode = ARRAY_SIZE(alc861_asus_modes), + .channel_mode = alc861_asus_modes, + .need_dac_fix = 1, + .hp_nid = 0x06, + .num_adc_nids = ARRAY_SIZE(alc861_adc_nids), + .adc_nids = alc861_adc_nids, + .input_mux = &alc861_capture_source, + }, }; [-- Attachment #3: ALSA-Configuration.txt.patch --] [-- Type: application/octet-stream, Size: 374 bytes --] --- ALSA-Configuration.txt 2006-10-20 20:58:05.000000000 +0200 +++ alsa-kernel/Documentation/ALSA-Configuration.txt 2006-10-20 21:21:54.000000000 +0200 @@ -836,6 +836,7 @@ 3stack-660 3-jack (for ALC660) uniwill-m31 Uniwill M31 laptop toshiba Toshiba laptop support + asus Asus laptop support auto auto-config reading BIOS (default) CMI9880 [-- Attachment #4: Type: text/plain, Size: 373 bytes --] ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 [-- Attachment #5: Type: text/plain, Size: 161 bytes --] _______________________________________________ Alsa-devel mailing list Alsa-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] Asus A6RP and ALC861 headphones problem solved 2006-10-20 20:21 ` mariook @ 2006-10-23 12:11 ` Takashi Iwai 0 siblings, 0 replies; 10+ messages in thread From: Takashi Iwai @ 2006-10-23 12:11 UTC (permalink / raw) To: mariook; +Cc: alsa-devel At Fri, 20 Oct 2006 22:21:21 +0200, <mariook@wp.pl> wrote: > > [1 <text/plain; ISO-8859-1 (7bit)>] > ----- Original Message ----- > From: "Takashi Iwai" <tiwai@suse.de> > To: "Tobin Davis" <tdavis@dsl-only.net> > Cc: <mariook@wp.pl>; <alsa-devel@lists.sourceforge.net> > Sent: Friday, October 20, 2006 3:33 PM > Subject: Re: [Alsa-devel] [PATCH] Asus A6RP and ALC861 headphones problem > solved > > > > At Thu, 19 Oct 2006 16:39:10 -0700, > > Tobin Davis wrote: > >> > >> What Takashi needs is a summary and description for the repository. > >> Here's an example from one of my patches: > >> > >> Summery: hda-codec - Add toshiba model to ALC861 codec > >> > >> This patch adds support for Toshiba laptops. Code is from > >> RealTek's alsa-driver-1.0.12-4.05b tree. > >> > >> Signed-off-by: Tobin Davis <tdavis@dsl-only.net> > > > > Yep, exactly. > > > >> Also, I made a minor revision to your patch, changing it from asus_a6rp > >> to just asus. I have been working on a similar patch for another Asus > >> Laptop (F3J), and if this works for them, great (otherwise I'm back to > >> square one). Still, better to be more generic than model specific. > >> Leave the model specific details for the config table array. Attached > >> are my changes. > > > > Don't forget to add an entry with modelname="asus", and change > > ALSA-Configuration.txt appropriately, too. > > > > > > Thanks, > > > > Takashi > > Ok, so here it is :) > > Summary: hda-codec - Add asus model to ALC861 codec > > This patch adds support for Asus laptops (for example: Asus > A6Rp-AP002). > > Signed-off-by: Mariusz Domanski <mariook@wp.pl> > > I modified patch_realtek.c from the newest hg tree and made asus.patch > basing on it (also included change made by Tobin - pci_subdevice for another > asus laptop). > I also modified the newest ALSA-Configuration.txt and made patch. > Patches are in the attachment. Thanks. Applied to ALSA HG tree now. Takashi ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-10-23 12:11 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-10-08 20:10 [PATCH] Asus A6RP and ALC861 headphones problem solved mariook 2006-10-09 13:31 ` Takashi Iwai 2006-10-11 16:36 ` mariook 2006-10-11 16:45 ` Takashi Iwai 2006-10-17 18:56 ` Takashi Iwai 2006-10-19 22:10 ` mariook 2006-10-19 23:39 ` Tobin Davis 2006-10-20 13:33 ` Takashi Iwai 2006-10-20 20:21 ` mariook 2006-10-23 12:11 ` Takashi Iwai
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.