Re: Thinkpad audio question

2011-09-15 Thread William Bulley
According to Warren Block wbl...@wonkity.com on Wed, 09/14/11 at 20:21:
 
 Two things you can do to improve the situation.

Thanks.

 First, describe the appropriate settings and files on 
 http://laptop.bsdgroup.de/freebsd/

Done.

 Then write some updates to the man page, or at least describe what is 
 missing, and submit a PR.

I will do this, but I first have to go through the procedure
of how to do this (by reading the handbook, very likely).

 This can be worthwhile doing just for yourself.  If a man page is 
 missing something for me once, chances are I'll hit it again later. 
 Helping others is a side benefit.

It isn't for me that I am doing this.  It is to help others - really.  :-)

Regards,

web...

-- 
William Bulley Email: w...@umich.edu

72 characters width template -|
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Thinkpad audio question

2011-09-15 Thread William Bulley
According to Jakub Lach jakub_l...@mailplus.pl on Wed, 09/14/11 at 23:11:

 It was mav (Alexander Motin), he proposed those hints
 after I complained that sound stopped working after 
 update. He wondered how I got sound to work
 in the first place, with hints I had previously.

I would have wondered the same.  The question that remains
to be answered is: how did mav (Alexander Motin) suss out
the details of how to do this in the first place?   :-)

 I don't think pushing those specific hints somewhere
 would be so beneficial, subtle hardware revision could
 change  pin associations. (e.g. Your friend's T500?)

True, but it might give someone an idea of where to
start looking...

 I don't think man page is missing something, it's
 verbose and exhaustive, with 4 examples of hints
 for various purposes. (The truth is out there! heh.)

We can agree to disagree, perhaps.  The man page is
complete, I agree, but it isn't a great read for a
user who doesn't understand audio hardware, has never
dealt with anything other than stereo speakers and
stereo headphones (with or without microphone).

The four (4!) examples all refer to the one (1!) HP
Compaq system.  And these explanations don't give a
good description of the connection between AS, NID,
SEQ, etc.  That is, there are examples there, but
the explainations assume that the reader knows more
about the underlying hardware and how audio systems
and chips work in general than is likely the case for
most users with laptops using the snd_hda(4) driver
supported hardware.  I hope that run-on sentence is
comprehensible to folks...  :-)

 The problem is, most people don't want (or don't 
 know they need) to swap line-out and speaker 
 functions, to split headphones and mic to separate 
 device etc. 

This is completly true - I agree wholeheartedly with this.

 They do not know why default pinout is not working 
 as it should, and what they should change.

Yep.

 They just want to have headphones and speakers
 working as intended :)

Well, d'oh!   :-)

 But I'm afraid this can't be directly addressed, as
 possibilities of default wrong pin associations are 
 endless.

Sadly, I must agree with you here also, sigh...  :-(

 If you think otherwise you are free to submit PR 
 as well :)

I am going to submit a PR (when I learn how from the
handbook), but not to suggest new text or wording.
Rather, I will make suggestions of areas that could
be improved for readability and understanding.

 best regards, 
 - Jakub Lach
 
 PS. I suspected that If by chance my device.hints
 will just work, the pedantic engineer in 
 you would be silenced somehow :P

Well, then you don't know me very well then, do you??  ;^)

Regards,

web...

-- 
William Bulley Email: w...@umich.edu

72 characters width template -|
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Thinkpad audio question

2011-09-14 Thread Daniel Staal

On Wed, September 14, 2011 9:44 am, William Bulley wrote:
 A friend of mine has an IBM T500 Thinkpad which is nearly identical to
 the one I have.  We both have interesting audio issues.  Any ideas as
 to why the problems explained below exist would be greatly appreciated.

 My T500 shows two devices /dev/mixer0 and /dev/mixer1 corresponding to
 pcm0 and pcm1 as displayed by % cat /dev/sndstat in 8.2-PRERELEASE from
 January 2011.  I am able to hear audio on the built-in speakers using
 /dev/mixer1 but not able to hear audio when plugging stereo headphones
 into the green audio out jack.  However, the speaker audio is muted
 when the headphones are plugged in.  I have tried two different head
 sets to rule out flawed hardware.

 My friend's T500 is more up-to-date than mine (likely 8.2-STABLE) but
 in his case headphone audio works perfectly and he has had no luck in
 getting audio out of his built-in laptop speakers.  Very weird...

 This situation sucks, but we have not been able to suss out what the
 problem is.  He and I have been running FreeBSD for over a decade, so
 we are not clueless, but this laptop audio weirdness has us stumped.

Quick thought: What versions of the BIOS are each of you running?

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Thinkpad audio question

2011-09-14 Thread William Bulley
According to Daniel Staal dst...@usa.net on Wed, 09/14/11 at 10:20:
 
 Quick thought: What versions of the BIOS are each of you running?

Can't speak for him, but here is the output from biosdecode(8):

thinkpad% biosdecode | m
# biosdecode 2.10
VPD present.
BIOS Build ID: 6FET66WW 
Box Serial Number: R8XYZ03
Motherboard Serial Number: VQ0VP98J5WA
Machine Type/Model: 2081CTO
SMBIOS 2.4 present.
Structure Table Length: 2627 bytes
Structure Table Address: 0x000E0010
Number Of Structures: 74
Maximum Structure Size: 120 bytes
BIOS32 Service Directory present.
Revision: 0
Calling Interface Address: 0x000FDC80
ACPI 2.0 present.
OEM Identifier: LENOVO
RSD Table 32-bit Address: 0x7CB6A207
XSD Table 64-bit Address: 0x7CB6A273
PNP BIOS 1.0 present.
Event Notification: Not Supported
Real Mode 16-bit Code Address: E192:1920
Real Mode 16-bit Data Address: 0040:
16-bit Protected Mode Code Address: 0x000F8AD7
16-bit Protected Mode Data Address: 0x0400

I don't know what to make of all this.  I hope this answers
your above question.  :-)

Regards,

web...

-- 
William Bulley Email: w...@umich.edu

72 characters width template -|
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Thinkpad audio question

2011-09-14 Thread Jakub Lach
See man snd_hda, you probably need to set device.hints.

For example, I with T400 have something like this in 
device hints:

hint.hdac.0.cad0.nid22.config=as=1 seq=15
hint.hdac.0.cad0.nid24.config=as=3
hint.hdac.0.cad0.nid26.config=as=1
hint.hdac.0.cad0.nid29.config=as=2

best regards, 
Jakub Lach

--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/Thinkpad-audio-question-tp4802936p4803609.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Thinkpad audio question

2011-09-14 Thread William Bulley
According to Jakub Lach jakub_l...@mailplus.pl on Wed, 09/14/11 at 13:10:

 See man snd_hda, you probably need to set device.hints.
 
 For example, I with T400 have something like this in 
 device hints:
 
 hint.hdac.0.cad0.nid22.config=as=1 seq=15
 hint.hdac.0.cad0.nid24.config=as=3
 hint.hdac.0.cad0.nid26.config=as=1
 hint.hdac.0.cad0.nid29.config=as=2

Thanks.  This looks very promising.  It is too bad the man page is so
busy and complex...  :-(

I had viewed this man page before, but I hoped I would never have to
deal with the details.  And I haven't until now...   :-)

One thing that could be made more clear is the lack of how to invoke
the verbose or reporting mode.  The word verbose appears just 
three (3!) times in the man page, but there is no explicit description
of how to get the driver to provide a verbose report.  The word report
in the EXAMPLES section refers to an HP/Compaq system housing a Realtek
ALC888 HDA codec whose driver can list the default pin configuration
as show.  Except the man page never explains how.   :-(

After a great deal of back and forth, I finally discovered the hint
dev.hdac.%d.pindump just above the EXAMPLES section.  As soon as I put
that entry in my /etc/sysctl.conf file (dev.hdac.0.pindump=1) and did
a reboot, the following appeared in my dmesg(8) output:   :-)

Intel 82801I HDAC mem 0xfc02-0xfc023fff irq 17 at device 27.0 on pci0
High Definition Audio Controller Driver Revision: 20100226_0142
HDA Codec #0: Conexant CX20561 (Hermosa)
HDA Codec #1: Conexant (Unknown)   = this seems confusing...
Dumping AFG cad=0 nid=1 pins:
 nid 22 0x022140f0 as 15 seq  0Headphones  Jack jack  1 loc  2 color   
Green misc 0
   Caps:OUT HP   Sense: 0x7fff
 nid 23 0x61a190f0 as 15 seq  0   Mic  None jack  1 loc 33 color
Pink misc 0 [DISABLED]
   Caps: IN VREF Sense: 0x7fff
 nid 24 0x02a190f0 as 15 seq  0   Mic  Jack jack  1 loc  2 color
Pink misc 0
   Caps: IN VREF Sense: 0x7fff
 nid 25 0x40f000f0 as 15 seq  0 Other  None jack  0 loc  0 color 
Unknown misc 0 [DISABLED]
   Caps:OUT  Sense: 0x7fff
 nid 26 0x901701f0 as 15 seq  0   Speaker Fixed jack  7 loc 16 color 
Unknown misc 1
   Caps:OUTEAPD 
 nid 27 0x40f001f0 as 15 seq  0 Other  None jack  0 loc  0 color 
Unknown misc 1 [DISABLED]
   Caps:OUTEAPD 
 nid 28 0x40f001f0 as 15 seq  0 Other  None jack  0 loc  0 color 
Unknown misc 1 [DISABLED]
   Caps:OUT 
 nid 29 0x90a601f0 as 15 seq  0   Mic Fixed jack  6 loc 16 color 
Unknown misc 1
   Caps: IN 
NumGPIO=4 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
GPIO: data=0x enable=0x direction=0x
  wake=0x  unsol=0xsticky=0x
Dumping AFG cad=0 nid=1 pins:
 nid 22 0x022140f0 as 15 seq  0Headphones  Jack jack  1 loc  2 color   
Green misc 0
   Caps:OUT HP   Sense: 0x7fff
 nid 23 0x61a190f0 as 15 seq  0   Mic  None jack  1 loc 33 color
Pink misc 0 [DISABLED]
   Caps: IN VREF Sense: 0x7fff
 nid 24 0x02a190f0 as 15 seq  0   Mic  Jack jack  1 loc  2 color
Pink misc 0
   Caps: IN VREF Sense: 0x7fff
 nid 25 0x40f000f0 as 15 seq  0 Other  None jack  0 loc  0 color 
Unknown misc 0 [DISABLED]
   Caps:OUT  Sense: 0x7fff
 nid 26 0x901701f0 as 15 seq  0   Speaker Fixed jack  7 loc 16 color 
Unknown misc 1
   Caps:OUTEAPD 
 nid 27 0x40f001f0 as 15 seq  0 Other  None jack  0 loc  0 color 
Unknown misc 1 [DISABLED]
   Caps:OUTEAPD 
 nid 28 0x40f001f0 as 15 seq  0 Other  None jack  0 loc  0 color 
Unknown misc 1 [DISABLED]
   Caps:OUT 
 nid 29 0x90a601f0 as 15 seq  0   Mic Fixed jack  6 loc 16 color 
Unknown misc 1
   Caps: IN 
NumGPIO=4 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
GPIO: data=0x enable=0x direction=0x
  wake=0x  unsol=0xsticky=0x

Now, re-reading the snd_hda man page with the above in hand, I just may
be able to make changes similar to what you have shown above provided I
can make sense of the above verbose output.  Thanks for all your help.  :-)

Regards,

web...

-- 
William Bulley Email: w...@umich.edu

72 characters width template -|
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Thinkpad audio question

2011-09-14 Thread Jakub Lach
For maximum verbosity you 
can also try setting in sysctl.conf

hw.snd.verbose=3

and 

$ cat /dev/sndstat then.

Not sure if you really need it though.

As for man page, that was my experience 
as well, and I just shamelessly  copied 
device.hints some kind spirit provided, 
so I'm not exactly pinout expert either :)

On a lighter note, once correct pinout 
will be set, you shouldn't have any 
more problems with CX20561, it's 
common and well supported chip.

regards, 
- Jakub Lach

--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/Thinkpad-audio-question-tp4802936p4804292.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Thinkpad audio question

2011-09-14 Thread William Bulley
According to Jakub Lach jakub_l...@mailplus.pl on Wed, 09/14/11 at 16:25:

 For maximum verbosity you 
 can also try setting in sysctl.conf
 
 hw.snd.verbose=3

I've had that setting for years, but it didn't help in this case, sigh...  :-(

 and 
 
 $ cat /dev/sndstat then.

Sure, that is what I always do to check which sound driver I have.

 Not sure if you really need it though.

True, it wasn't any help for this problem.

 As for man page, that was my experience 
 as well, and I just shamelessly  copied 
 device.hints some kind spirit provided, 
 so I'm not exactly pinout expert either :)

Heh...  :-)

 On a lighter note, once correct pinout 
 will be set, you shouldn't have any 
 more problems with CX20561, it's 
 common and well supported chip.

That is nice to know...

Here is the deal:

when I % cat /dev/sndstat it shows both pcm0 and psm1 as:

   HDA Conexant CX20561 (Hermosa)

but not in the verbose output below from dmesg(8).

Right now I have this (after some reformatting - no TABs either!):

HDA Codec #0: Conexant CX20561 (Hermosa)
HDA Codec #1: Conexant (Unknown)  = not sure why this is

Dumping AFG cad=0 nid=1 pins:

nid 22 0x022140f0 as 15 seq  0  Headphones  Jack  jack  1 loc  2 color Green   
misc 0Caps: OUT HP  Sense: 0x
7fff
nid 23 0x61a190f0 as 15 seq  0  Mic None  jack  1 loc 33 color Pink
misc 0 [DISABLED] Caps: IN VREF Sense: 0x
7fff
nid 24 0x02a190f0 as 15 seq  0  Mic Jack  jack  1 loc  2 color Pink
misc 0Caps: IN VREF Sense: 0x
7fff
nid 25 0x40f000f0 as 15 seq  0  Other   None  jack  0 loc  0 color Unknown 
misc 0 [DISABLED] Caps: OUT Sense: 0x
7fff
nid 26 0x901701f0 as 15 seq  0  Speaker Fixed jack  7 loc 16 color Unknown 
misc 1Caps: OUT EAPD
nid 27 0x40f001f0 as 15 seq  0  Other   None  jack  0 loc  0 color Unknown 
misc 1 [DISABLED] Caps: OUT EAPD
nid 28 0x40f001f0 as 15 seq  0  Other   None  jack  0 loc  0 color Unknown 
misc 1 [DISABLED] Caps: OUT
nid 29 0x90a601f0 as 15 seq  0  Mic Fixed jack  6 loc 16 color Unknown 
misc 1Caps: IN 

After disregarding the DISABLED lines I have this:

nid 22 0x022140f0 as 15 seq  0  Headphones  Jack  jack  1 loc  2 color Green   
misc 0Caps: OUT HP  Sense: 0x
7fff
nid 24 0x02a190f0 as 15 seq  0  Mic Jack  jack  1 loc  2 color Pink
misc 0Caps: IN VREF Sense: 0x
7fff
nid 26 0x901701f0 as 15 seq  0  Speaker Fixed jack  7 loc 16 color Unknown 
misc 1Caps: OUT EAPD
nid 29 0x90a601f0 as 15 seq  0  Mic Fixed jack  6 loc 16 color Unknown 
misc 1Caps: IN

The snd_hda(4) man page does not discuss what EAPD is, nor what
VREF is, nor what HP is.  It also does not discuss Caps: but
I can infer what IN and OUT are.   :-)

So, I have a speaker (big whoop) and two jacks: one pink and
one green (but I already knew that, too).

I note that there is only one AS (15, or is that 14?) and only
one seq (0) which doesn't mesh well with your earlier T400
suggestion:

 hint.hdac.0.cad0.nid22.config=as=1 seq=15
 hint.hdac.0.cad0.nid24.config=as=3
 hint.hdac.0.cad0.nid26.config=as=1
 hint.hdac.0.cad0.nid29.config=as=2

For example, where did 'AS'es 1, 2, 3 come from?
And where did seq 15 come from?   :-(

However, it is mighty curious that your four nids
match my four non-DISABLED nids - hmmm...   :-)

Recognizing from your comments above that you may
not be able to answer these rhetorical questions,
but if I just try your suggestions blind what
are the chances it will just work for me?  I do
hate just copying something without knowing what
the heck it means -- just the pedantic engineer in
me, I reckon...  :-)

The snd_hda(4) man page is not very helpful in
explaining what your four hints would do for
my T500 problem, but I guess it is worth a try.

Regards,

web...

-- 
William Bulley Email: w...@umich.edu

72 characters width template -|
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Thinkpad audio question

2011-09-14 Thread Jakub Lach
I would love to investigate it properly further, 
however I'm critically low on time, so I can only
offer pinout dump with my device.hints at this 
time, sorry

http://pastebin.com/ig54CwT9

good luck, 
- Jakub Lach

--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/Thinkpad-audio-question-tp4802936p4804434.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Thinkpad audio question

2011-09-14 Thread William Bulley
According to Jakub Lach jakub_l...@mailplus.pl on Wed, 09/14/11 at 17:01:

 I would love to investigate it properly further, 
 however I'm critically low on time, so I can only
 offer pinout dump with my device.hints at this 
 time, sorry
 
 http://pastebin.com/ig54CwT9
 
 good luck, 

Thanks!  But no thanks -- because I got it to work with your T400
hints!  :-)

You have been most helpful and I really appreciate it.  I wonder
just who came up with those in the first place?  :-)

Regards,

web...

-- 
William Bulley Email: w...@umich.edu

72 characters width template -|
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Thinkpad audio question

2011-09-14 Thread Warren Block

On Wed, 14 Sep 2011, William Bulley wrote:


According to Jakub Lach jakub_l...@mailplus.pl on Wed, 09/14/11 at 17:01:


I would love to investigate it properly further,
however I'm critically low on time, so I can only
offer pinout dump with my device.hints at this
time, sorry

http://pastebin.com/ig54CwT9

good luck,


Thanks!  But no thanks -- because I got it to work with your T400
hints!  :-)

You have been most helpful and I really appreciate it.  I wonder
just who came up with those in the first place?  :-)


Two things you can do to improve the situation.

First, describe the appropriate settings and files on 
http://laptop.bsdgroup.de/freebsd/


Then write some updates to the man page, or at least describe what is 
missing, and submit a PR.


This can be worthwhile doing just for yourself.  If a man page is 
missing something for me once, chances are I'll hit it again later. 
Helping others is a side benefit.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Thinkpad audio question

2011-09-14 Thread Jakub Lach
It was mav (Alexander Motin), he proposed those hints
after I complained that sound stopped working after 
update. He wondered how I got sound to work
in the first place, with hints I had previously.

I don't think pushing those specific hints somewhere
would be so beneficial, subtle hardware revision could
change  pin associations. (e.g. Your friend's T500?)

I don't think man page is missing something, it's
verbose and exhaustive, with 4 examples of hints
for various purposes. (The truth is out there! heh.)

The problem is, most people don't want (or don't 
know they need) to swap line-out and speaker 
functions, to split headphones and mic to separate 
device etc. 

They do not know why default pinout is not working 
as it should, and what they should change.

They just want to have headphones and speakers
working as intended :)

But I'm afraid this can't be directly addressed, as
possibilities of default wrong pin associations are 
endless.

If you think otherwise you are free to submit PR 
as well :)

best regards, 
- Jakub Lach

PS. I suspected that If by chance my device.hints
will just work, the pedantic engineer in 
you would be silenced somehow :P

--
View this message in context: 
http://freebsd.1045724.n5.nabble.com/Thinkpad-audio-question-tp4802936p4805409.html
Sent from the freebsd-questions mailing list archive at Nabble.com.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org