Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Nov 2008 14:23:01 +0200
From:      Andriy Gapon <avg@icyb.net.ua>
To:        Alexander Motin <mav@FreeBSD.org>
Cc:        freebsd-multimedia@FreeBSD.org
Subject:   Re: Intel 82801I hda, STAC9271D codec: problem(s)
Message-ID:  <4912E1A5.6040206@icyb.net.ua>
In-Reply-To: <4911B9FE.6000505@FreeBSD.org>
References:  <4910CD23.9090902@icyb.net.ua> <491162E9.4020400@FreeBSD.org> <4911AA93.9050603@icyb.net.ua> <4911B9FE.6000505@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 05/11/2008 17:21 Alexander Motin said the following:
> Andriy Gapon wrote:
>> Headphones playback: works only through pcm0 and only through rear
>> connector. Front jack playback doesn't work using either pcm device.
> 
> It may happen if your front connector is too simple and does not really
> supports jack detection reported by the codec. Without knowing that jack
> is inserted, driver will not redirect sound there. You may check jack
> presence feature by comparing pin dump output (sysctl
> dev.hdac.0.pindump=1) with and without jack inserted.


Alexander,

thanks again.
I tried this and indeed the dump is the same for front connection and
for no connection, it is different for rear connection.  I plugged both
headphone and mic at the same location.

Just in case:
== rear ===
Dumping AFG cad=2 nid=1 pins:
 nid 10 0x0221401f as  1 seq 15    Headphones  Jack jack  1 loc  2 color
  Green misc 0
       Caps: IN OUT HP      VREF Sense: 0x00002710 delay 10us
 nid 11 0x02a19040 as  4 seq  0           Mic  Jack jack  1 loc  2 color
   Pink misc 0
       Caps: IN OUT HP      VREF Sense: 0xffffffff delay 100000us
 nid 12 0x0181302e as  2 seq 14       Line-in  Jack jack  1 loc  1 color
   Blue misc 0
       Caps: IN OUT         VREF Sense: 0x00002710 delay 20us
 nid 13 0x01114010 as  1 seq  0       Speaker  Jack jack  1 loc  1 color
  Green misc 0
       Caps: IN OUT HP      VREF Sense: 0xffffffff delay 100000us
 nid 14 0x01a19020 as  2 seq  0           Mic  Jack jack  1 loc  1 color
   Pink misc 0
       Caps: IN OUT         VREF Sense: 0x00002710 delay 10us
 nid 15 0x01111012 as  1 seq  2       Speaker  Jack jack  1 loc  1 color
  Black misc 0
       Caps: IN OUT         VREF Sense: 0x7fffffff delay 100000us
 nid 16 0x01116011 as  1 seq  1       Speaker  Jack jack  1 loc  1 color
 Orange misc 0
       Caps: IN OUT              Sense: 0x0000012c delay 10us
 nid 17 0x400000fb as 15 seq 11      Line-out  None jack  0 loc  0 color
Unknown misc 0 [DISABLED]
       Caps: IN OUT              Sense: 0x7fffffff delay 100000us
 nid 18 0x400000fc as 15 seq 12      Line-out  None jack  0 loc  0 color
Unknown misc 0 [DISABLED]
       Caps: IN
 nid 33 0x01452150 as  5 seq  0     SPDIF-out  Jack jack  5 loc  1 color
   Grey misc 1
       Caps:    OUT
 nid 34 0x400000fd as 15 seq 13      Line-out  None jack  0 loc  0 color
Unknown misc 0 [DISABLED]
       Caps: IN        EAPD      Sense: 0x00000000
NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=1 GPIUnsol=1
GPIO: data=0x00000000 enable=0x00000000 direction=0x00000000
      wake=0x00000000  unsol=0x00000000    sticky=0x00000000

=== front and none ===
Dumping AFG cad=2 nid=1 pins:
 nid 10 0x0221401f as  1 seq 15    Headphones  Jack jack  1 loc  2 color
  Green misc 0
       Caps: IN OUT HP      VREF Sense: 0x00002710
 nid 11 0x02a19040 as  4 seq  0           Mic  Jack jack  1 loc  2 color
   Pink misc 0
       Caps: IN OUT HP      VREF Sense: 0x7fffffff delay 100000us
 nid 12 0x0181302e as  2 seq 14       Line-in  Jack jack  1 loc  1 color
   Blue misc 0
       Caps: IN OUT         VREF Sense: 0x00002710
 nid 13 0x01114010 as  1 seq  0       Speaker  Jack jack  1 loc  1 color
  Green misc 0
       Caps: IN OUT HP      VREF Sense: 0x7fffffff delay 100000us
 nid 14 0x01a19020 as  2 seq  0           Mic  Jack jack  1 loc  1 color
   Pink misc 0
       Caps: IN OUT         VREF Sense: 0x00002710
 nid 15 0x01111012 as  1 seq  2       Speaker  Jack jack  1 loc  1 color
  Black misc 0
       Caps: IN OUT         VREF Sense: 0x7fffffff delay 100000us
 nid 16 0x01116011 as  1 seq  1       Speaker  Jack jack  1 loc  1 color
 Orange misc 0
       Caps: IN OUT              Sense: 0x00002710
 nid 17 0x400000fb as 15 seq 11      Line-out  None jack  0 loc  0 color
Unknown misc 0 [DISABLED]
       Caps: IN OUT              Sense: 0x7fffffff delay 100000us
 nid 18 0x400000fc as 15 seq 12      Line-out  None jack  0 loc  0 color
Unknown misc 0 [DISABLED]
       Caps: IN
 nid 33 0x01452150 as  5 seq  0     SPDIF-out  Jack jack  5 loc  1 color
   Grey misc 1
       Caps:    OUT
 nid 34 0x400000fd as 15 seq 13      Line-out  None jack  0 loc  0 color
Unknown misc 0 [DISABLED]
       Caps: IN        EAPD      Sense: 0x00000000
NumGPIO=3 NumGPO=0 NumGPI=0 GPIWake=1 GPIUnsol=1
GPIO: data=0x00000000 enable=0x00000000 direction=0x00000000
      wake=0x00000000  unsol=0x00000000    sticky=0x00000000

>> It used to work with stock stable_7 driver.
> 
> 7-STABLE driver plays the same sound via all possible connectors. New
> driver behaves in much more complicated way according to UAA specification.

I understand.

>> Also it seems that volume of playback is lower than it used to be.
> 
> New driver uses different volume control scheme. But the general volume
> range should be the same. Your codec provides very broad range of
> supported volumes, from -95 to 0dB. So 80% of that range is probably
> very quiet.

I see.

>> Recording: I tested only rear jack and it seems that it works only
>> through pcm1(!). Nothing is recorded through pcm0 whatever recording
>> source I tried.
> 
> That's strange. Codec configuration speaks that pcm0 must record from
> rear mic (monitor), rear line-in (line), and pcm1 must record from front
> mic (mic). It may be a codec misconfiguration.

It might very well be. I've just looked for an updated BIOS on Intel
site and there have already been several new revisions.
Release notes contain some interesting items:

- Fixed problem where Front Panel Audio does not show up in
- Peripheral Configuration page when connected.
- Fix issue where codec verb tables are failing WHQL UAA
- compliant test.

So I'll try to update BIOS first.

>> So for now I am using only rear jacks and I use pcm0 for playback and
>> pcm1 for recording. This is Good Enough(thanks!) but I am curious if
>> there is a room for improvement. I read through the update man page, but
>> I am probably too dense to figure which knobs I should try changing.
>> There is just too many possibilities.
> 
> There are really much possibilities, but you should first answer two
> questions: what do you want to have and what your hardware can do?
> 
> Some examples of possible configurations provided in man page, but you
> may want to invent something more customized. The main hardware feature
> you should test - is a jack presence detection. More info about your
> codec organization you may get from diagram on page 35 of codec
> datasheet: http://www.idt.com/products/getDoc.cfm?docID=18451989

Thanks for the pointers/hints. I will play with HDA configuration if it
is still necessary after BIOS upgrade.


-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4912E1A5.6040206>