* HDA pin sense and presence detect capability @ 2006-01-25 15:34 Arnaud Patard 2006-01-25 15:43 ` Takashi Iwai 0 siblings, 1 reply; 8+ messages in thread From: Arnaud Patard @ 2006-01-25 15:34 UTC (permalink / raw) To: alsa-devel Hi, On some laptops with HDA codecs, there are different nids for the Headphones and for the built-in speakers. This results in having sound on speakers and on headphones at the same time. imho, the expected behaviour is to have sound only on headphones (without having to play with the mixer). This can be achieve with the presence detect capability (0x709,0xf09): When plug/unplugging the headphones, one gets an unsollicited responsed and the driver mute the channels. Is there something to do that in the code or should I go and code it ? Any opinion/comments about that ? Regards, Arnaud ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: HDA pin sense and presence detect capability 2006-01-25 15:34 HDA pin sense and presence detect capability Arnaud Patard @ 2006-01-25 15:43 ` Takashi Iwai 2006-01-25 15:50 ` Arnaud Patard 0 siblings, 1 reply; 8+ messages in thread From: Takashi Iwai @ 2006-01-25 15:43 UTC (permalink / raw) To: Arnaud Patard; +Cc: alsa-devel At Wed, 25 Jan 2006 16:34:22 +0100, Arnaud Patard wrote: > > Hi, > > > On some laptops with HDA codecs, there are different nids for the > Headphones and for the built-in speakers. This results in having sound > on speakers and on headphones at the same time. imho, the expected > behaviour is to have sound only on headphones (without having to play > with the mixer). > > This can be achieve with the presence detect capability (0x709,0xf09): When > plug/unplugging the headphones, one gets an unsollicited responsed and > the driver mute the channels. > > Is there something to do that in the code or should I go and code it ? > Any opinion/comments about that ? You can find an example of such unsolicited event in patch_sigmatel.c. Takashi ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: HDA pin sense and presence detect capability 2006-01-25 15:43 ` Takashi Iwai @ 2006-01-25 15:50 ` Arnaud Patard 2006-01-25 16:01 ` Takashi Iwai 2006-01-25 16:08 ` Matt Porter 0 siblings, 2 replies; 8+ messages in thread From: Arnaud Patard @ 2006-01-25 15:50 UTC (permalink / raw) To: Takashi Iwai; +Cc: alsa-devel Takashi Iwai <tiwai@suse.de> writes: > At Wed, 25 Jan 2006 16:34:22 +0100, > Arnaud Patard wrote: >> >> Hi, >> >> >> On some laptops with HDA codecs, there are different nids for the >> Headphones and for the built-in speakers. This results in having sound >> on speakers and on headphones at the same time. imho, the expected >> behaviour is to have sound only on headphones (without having to play >> with the mixer). >> >> This can be achieve with the presence detect capability (0x709,0xf09): When >> plug/unplugging the headphones, one gets an unsollicited responsed and >> the driver mute the channels. >> >> Is there something to do that in the code or should I go and code it ? >> Any opinion/comments about that ? > > You can find an example of such unsolicited event in > patch_sigmatel.c. okay. Thanks. About what's done in patch_sigmatel.c : what's the point of disabling the output ? imho, you only need to mute the nid. Also, if there are several users of similar functions and on others chips than sigmatel, shouldn't it be better to put something in hda_codec.c ? Regards, Arnaud > > > Takashi ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: HDA pin sense and presence detect capability 2006-01-25 15:50 ` Arnaud Patard @ 2006-01-25 16:01 ` Takashi Iwai 2006-01-25 16:08 ` Matt Porter 1 sibling, 0 replies; 8+ messages in thread From: Takashi Iwai @ 2006-01-25 16:01 UTC (permalink / raw) To: Arnaud Patard; +Cc: alsa-devel At Wed, 25 Jan 2006 16:50:40 +0100, Arnaud Patard wrote: > > Takashi Iwai <tiwai@suse.de> writes: > > > At Wed, 25 Jan 2006 16:34:22 +0100, > > Arnaud Patard wrote: > >> > >> Hi, > >> > >> > >> On some laptops with HDA codecs, there are different nids for the > >> Headphones and for the built-in speakers. This results in having sound > >> on speakers and on headphones at the same time. imho, the expected > >> behaviour is to have sound only on headphones (without having to play > >> with the mixer). > >> > >> This can be achieve with the presence detect capability (0x709,0xf09): When > >> plug/unplugging the headphones, one gets an unsollicited responsed and > >> the driver mute the channels. > >> > >> Is there something to do that in the code or should I go and code it ? > >> Any opinion/comments about that ? > > > > You can find an example of such unsolicited event in > > patch_sigmatel.c. > > okay. Thanks. > > About what's done in patch_sigmatel.c : what's the point of disabling > the output ? imho, you only need to mute the nid. I guess it's just to be sure. > Also, if there are several users of similar functions and on others chips than > sigmatel, shouldn't it be better to put something in hda_codec.c ? Yep, the whole codec patch stuff could be more cleaned up. Takashi ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: HDA pin sense and presence detect capability 2006-01-25 15:50 ` Arnaud Patard 2006-01-25 16:01 ` Takashi Iwai @ 2006-01-25 16:08 ` Matt Porter 2006-01-25 16:57 ` Arnaud Patard 1 sibling, 1 reply; 8+ messages in thread From: Matt Porter @ 2006-01-25 16:08 UTC (permalink / raw) To: Arnaud Patard; +Cc: Takashi Iwai, alsa-devel On Wed, Jan 25, 2006 at 04:50:40PM +0100, Arnaud Patard wrote: > Takashi Iwai <tiwai@suse.de> writes: > > > At Wed, 25 Jan 2006 16:34:22 +0100, > > Arnaud Patard wrote: > >> This can be achieve with the presence detect capability (0x709,0xf09): When > >> plug/unplugging the headphones, one gets an unsollicited responsed and > >> the driver mute the channels. > >> > >> Is there something to do that in the code or should I go and code it ? > >> Any opinion/comments about that ? > > > > You can find an example of such unsolicited event in > > patch_sigmatel.c. > > okay. Thanks. > > About what's done in patch_sigmatel.c : what's the point of disabling > the output ? imho, you only need to mute the nid. It seemed easier to disable the actual pin nid outputs for all line outs (thing surround) than walk back to the associated DAC nids (which can vary on sigmatel codecs) and mute those. It accomplishes the same thing as muting...except there's no change in mixer state. > Also, if there are several users of similar functions and on others chips than > sigmatel, shouldn't it be better to put something in hda_codec.c ? I think so, but this was somewhat of an experimental first attempt at this support. I just haven't had time to do much more with it yet. -Matt ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: HDA pin sense and presence detect capability 2006-01-25 16:08 ` Matt Porter @ 2006-01-25 16:57 ` Arnaud Patard 2006-01-25 17:14 ` Matt Porter 0 siblings, 1 reply; 8+ messages in thread From: Arnaud Patard @ 2006-01-25 16:57 UTC (permalink / raw) To: Matt Porter; +Cc: Takashi Iwai, alsa-devel Matt Porter <mporter@embeddedalley.com> writes: > On Wed, Jan 25, 2006 at 04:50:40PM +0100, Arnaud Patard wrote: >> Takashi Iwai <tiwai@suse.de> writes: >> >> > At Wed, 25 Jan 2006 16:34:22 +0100, >> > Arnaud Patard wrote: >> >> This can be achieve with the presence detect capability (0x709,0xf09): When >> >> plug/unplugging the headphones, one gets an unsollicited responsed and >> >> the driver mute the channels. >> >> >> >> Is there something to do that in the code or should I go and code it ? >> >> Any opinion/comments about that ? >> > >> > You can find an example of such unsolicited event in >> > patch_sigmatel.c. >> >> okay. Thanks. >> >> About what's done in patch_sigmatel.c : what's the point of disabling >> the output ? imho, you only need to mute the nid. > > It seemed easier to disable the actual pin nid outputs for all line outs > (thing surround) than walk back to the associated DAC nids (which can I see... but afaik, muting the DAC is not the solution because you may have one DAC with the HP and speakers nids connected to it (for instance on the ad1981hd). My point was about muting the nid itself. > vary on sigmatel codecs) and mute those. It accomplishes the same > thing as muting...except there's no change in mixer state. Reflecting a change in the mixer state is more userfriendly but as long as it's working as the user expects, that's not a real worry. > >> Also, if there are several users of similar functions and on others chips than >> sigmatel, shouldn't it be better to put something in hda_codec.c ? > > I think so, but this was somewhat of an experimental first attempt > at this support. I just haven't had time to do much more with it yet. okay. I'm trying to have something working for my codec and then I'll try to work on this. If you don't agree, scream :) Regards, Arnaud > > -Matt ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: HDA pin sense and presence detect capability 2006-01-25 16:57 ` Arnaud Patard @ 2006-01-25 17:14 ` Matt Porter 2006-01-25 17:32 ` Arnaud Patard 0 siblings, 1 reply; 8+ messages in thread From: Matt Porter @ 2006-01-25 17:14 UTC (permalink / raw) To: Arnaud Patard; +Cc: Matt Porter, Takashi Iwai, alsa-devel On Wed, Jan 25, 2006 at 05:57:46PM +0100, Arnaud Patard wrote: > Matt Porter <mporter@embeddedalley.com> writes: > > > On Wed, Jan 25, 2006 at 04:50:40PM +0100, Arnaud Patard wrote: > >> About what's done in patch_sigmatel.c : what's the point of disabling > >> the output ? imho, you only need to mute the nid. > > > > It seemed easier to disable the actual pin nid outputs for all line outs > > (thing surround) than walk back to the associated DAC nids (which can > > I see... but afaik, muting the DAC is not the solution because you may > have one DAC with the HP and speakers nids connected to it (for instance > on the ad1981hd). My point was about muting the nid itself. Indeed, that's the other reason for not doing it that way. What do you mean by "muting the nid itself"? The pin widget nid? There's no mute on the sigmatel codec pin widgets since there's no amp capability there. Disabling the output is the way to mute at the pin widget... at least on sigmatel hda codecs. > > vary on sigmatel codecs) and mute those. It accomplishes the same > > thing as muting...except there's no change in mixer state. > > Reflecting a change in the mixer state is more userfriendly but as long > as it's working as the user expects, that's not a real worry. Yeah, I wasn't sure about that. On the sigmatel codecs, the output amps are in the DAC nids so we'd have to mute all of them in an associated group if this is the desired userfriendly view of things. Not a big deal to do, just not as simple as my first pass. > >> Also, if there are several users of similar functions and on others chips than > >> sigmatel, shouldn't it be better to put something in hda_codec.c ? > > > > I think so, but this was somewhat of an experimental first attempt > > at this support. I just haven't had time to do much more with it yet. > > okay. I'm trying to have something working for my codec and then I'll > try to work on this. If you don't agree, scream :) I think it's great. Sounds like Takashi wants to see more shared code as well and his opinion if far more important. ;) -Matt ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: HDA pin sense and presence detect capability 2006-01-25 17:14 ` Matt Porter @ 2006-01-25 17:32 ` Arnaud Patard 0 siblings, 0 replies; 8+ messages in thread From: Arnaud Patard @ 2006-01-25 17:32 UTC (permalink / raw) To: Matt Porter; +Cc: Takashi Iwai, alsa-devel Matt Porter <mporter@embeddedalley.com> writes: > On Wed, Jan 25, 2006 at 05:57:46PM +0100, Arnaud Patard wrote: >> Matt Porter <mporter@embeddedalley.com> writes: >> >> > On Wed, Jan 25, 2006 at 04:50:40PM +0100, Arnaud Patard wrote: >> >> About what's done in patch_sigmatel.c : what's the point of disabling >> >> the output ? imho, you only need to mute the nid. >> > >> > It seemed easier to disable the actual pin nid outputs for all line outs >> > (thing surround) than walk back to the associated DAC nids (which can >> >> I see... but afaik, muting the DAC is not the solution because you may >> have one DAC with the HP and speakers nids connected to it (for instance >> on the ad1981hd). My point was about muting the nid itself. > > Indeed, that's the other reason for not doing it that way. What do > you mean by "muting the nid itself"? The pin widget nid? There's no > mute on the sigmatel codec pin widgets since there's no amp capability > there. Disabling the output is the way to mute at the pin widget... > at least on sigmatel hda codecs. oh okay. I was (wrongly) thinking that you were having amp capability like here. So, your solution is probably better as it'll work in all cases imho > >> > vary on sigmatel codecs) and mute those. It accomplishes the same >> > thing as muting...except there's no change in mixer state. >> >> Reflecting a change in the mixer state is more userfriendly but as long >> as it's working as the user expects, that's not a real worry. > > Yeah, I wasn't sure about that. On the sigmatel codecs, the output > amps are in the DAC nids so we'd have to mute all of them in an > associated group if this is the desired userfriendly view of things. > Not a big deal to do, just not as simple as my first pass. > >> >> Also, if there are several users of similar functions and on others chips than >> >> sigmatel, shouldn't it be better to put something in hda_codec.c ? >> > >> > I think so, but this was somewhat of an experimental first attempt >> > at this support. I just haven't had time to do much more with it yet. >> >> okay. I'm trying to have something working for my codec and then I'll >> try to work on this. If you don't agree, scream :) > > I think it's great. Sounds like Takashi wants to see more shared > code as well and his opinion if far more important. ;) sure :) Regards, Arnaud ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-01-25 17:31 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-01-25 15:34 HDA pin sense and presence detect capability Arnaud Patard 2006-01-25 15:43 ` Takashi Iwai 2006-01-25 15:50 ` Arnaud Patard 2006-01-25 16:01 ` Takashi Iwai 2006-01-25 16:08 ` Matt Porter 2006-01-25 16:57 ` Arnaud Patard 2006-01-25 17:14 ` Matt Porter 2006-01-25 17:32 ` Arnaud Patard
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.