Re: ASUS P4P800-VM + AD1980 (Was Re: VIA8235 + AD1980)

2003-11-02 Thread Wilko Bulte
On Tue, Aug 19, 2003 at 04:32:30PM -0700, Orion Hodson wrote:
> /-- Wilko Bulte wrote:
> | 
> | hi, sorry for jumping in late: what is/is not now in 4.8-stable
> | as far as the patches go to make the Asus P4P800 work?
> | 
> | I get as far as:
> | 
> | [EMAIL PROTECTED] ~: dmesg| grep pcm
> | pcm0:  port 0xee80-0xeebf,0xe800-0xe8ff mem
> | 0xfebff400-0xfebff4ff,0xfebff800-0xfebff9ff irq 10 at device 31.5 on pci0
> | pcm0: 
> | [EMAIL PROTECTED] ~: cat /dev/sndstat 
> | FreeBSD Audio Driver (newpcm)
> | Installed devices:
> | pcm0:  at io 0xfebff800, 0xfebff400 irq 10 bufsz 16384
> | (1p/1r/0v channels duplex)
> | [EMAIL PROTECTED] ~: 
> 
> Okay, I've not looked at the specs for the AD1985 at all or looked into what other 
> folks are doing regarding custom initialization patches for it.  We don't have any 
> code in the tree at present that is likely to help.  A similar patch to Oleg's 
> submission for the AD1980 might be applicable, but that's not in the tree today 
> (still thinking about some general issues arising relating to this).


Just for the record: 4.9R / 4.9-stable still have the 'no sound' problem on the
P4P800. 

Rudolf's patches apply cleanly, and then sound is working.

-- 
|   / o / /_  _ [EMAIL PROTECTED]
|/|/ / / /(  (_)  Bulte 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ASUS P4P800-VM + AD1980 (Was Re: VIA8235 + AD1980)

2003-08-20 Thread Wilko Bulte
On Wed, Aug 20, 2003 at 11:52:28AM +0200, Rudolf Cejka wrote:
> Wilko Bulte wrote (2003/08/20):
> > On Tue, Aug 19, 2003 at 07:09:40AM -0700, Orion Hodson wrote:
> > > Rather than "defensively" assign the input monitor control 
> > > (SOUND_MIXER_MONITOR) to an output, it'd be better to use a separate output 

...

> > hi, sorry for jumping in late: what is/is not now in 4.8-stable
> > as far as the patches go to make the Asus P4P800 work?
> 
> It looks problematic. Does anybody know, how to really get
> information, how the chip is connected on the mainboard?
> 
> > But no sound, as reported earlier.
> 
> I have updated my "... :o)" patches in
> ftp://ftp.FreeBSD.cz/pub/FreeBSD-local/ich which would fix volume
> control atleast on AD1885 and no sound on AD1980/AD1985 (and break
> the same things for the others). They are for -current, but the same
> change should work for -stable too. Does they work for you?

They apply flawlessly to -stable and I now have working onboard
sound on the P4P800.

Great!

W/

-- 
|   / o / /_  _ [EMAIL PROTECTED]
|/|/ / / /(  (_)  Bulte 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ASUS P4P800-VM + AD1980 (Was Re: VIA8235 + AD1980)

2003-08-20 Thread Rudolf Cejka
Wilko Bulte wrote (2003/08/20):
> On Tue, Aug 19, 2003 at 07:09:40AM -0700, Orion Hodson wrote:
> > Rather than "defensively" assign the input monitor control 
> > (SOUND_MIXER_MONITOR) to an output, it'd be better to use a separate output 
> > control, eg add a control for SOUND_MIXER_OGAIN, should it actually be 
> > necessary.

I think that SOUND_MIXER_OGAIN should be used just for 4 or 6 channel
configuration. However, by default the chip seems to be 2 channel and
main volume is simply controlled by lineout, headphone, or surround,
depending on something.

> hi, sorry for jumping in late: what is/is not now in 4.8-stable
> as far as the patches go to make the Asus P4P800 work?

It looks problematic. Does anybody know, how to really get
information, how the chip is connected on the mainboard?

> But no sound, as reported earlier.

I have updated my "... :o)" patches in
ftp://ftp.FreeBSD.cz/pub/FreeBSD-local/ich which would fix volume
control atleast on AD1885 and no sound on AD1980/AD1985 (and break
the same things for the others). They are for -current, but the same
change should work for -stable too. Does they work for you?

-- 
Rudolf Cejka  http://www.fit.vutbr.cz/~cejkar
Brno University of Technology, Faculty of Information Technology
Bozetechova 2, 612 66  Brno, Czech Republic
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ASUS P4P800-VM + AD1980 (Was Re: VIA8235 + AD1980)

2003-08-19 Thread Orion Hodson
/-- Wilko Bulte wrote:
| 
| hi, sorry for jumping in late: what is/is not now in 4.8-stable
| as far as the patches go to make the Asus P4P800 work?
| 
| I get as far as:
| 
| [EMAIL PROTECTED] ~: dmesg| grep pcm
| pcm0:  port 0xee80-0xeebf,0xe800-0xe8ff mem
| 0xfebff400-0xfebff4ff,0xfebff800-0xfebff9ff irq 10 at device 31.5 on pci0
| pcm0: 
| [EMAIL PROTECTED] ~: cat /dev/sndstat 
| FreeBSD Audio Driver (newpcm)
| Installed devices:
| pcm0:  at io 0xfebff800, 0xfebff400 irq 10 bufsz 16384
| (1p/1r/0v channels duplex)
| [EMAIL PROTECTED] ~: 

Okay, I've not looked at the specs for the AD1985 at all or looked into what other 
folks are doing regarding custom initialization patches for it.  We don't have any 
code in the tree at present that is likely to help.  A similar patch to Oleg's 
submission for the AD1980 might be applicable, but that's not in the tree today (still 
thinking about some general issues arising relating to this).

As a potential short term fix you might check that moving the "monitor" gain right up 
doesn't improve the situation.

Regards
- Orion

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ASUS P4P800-VM + AD1980 (Was Re: VIA8235 + AD1980)

2003-08-19 Thread Wilko Bulte
On Tue, Aug 19, 2003 at 07:09:40AM -0700, Orion Hodson wrote:
> /-- Rudolf Cejka wrote:
> | Rudolf Cejka wrote (2003/08/18):
> | >   my "another machine" is at home, so I will be sure about your patch
> | > tomorrow and I will send you another mail, however it looks reasonably.
> | > Maybe just for "defensive programming" wouldn't it be "safer" to switch
> | > values instead of assignment? Maybe there are some boards, which can use
> | > both outputs...
> | 
> | So, I have tested your patch (machine with AD1885) and it works for me,
> | however it would be really better to switch values instead of assignment
> | even in my case just with HP_OUT connected. With an assignment, it is
> | possible to control main volume by two independent controls,
> | SOUND_MIXER_VOLUME and SOUND_MIXER_MONITOR, and if I change one of them,
> | then there is an inconsistency between the real volume state and the other
> | control.
> 
> Thank you for the info regarding the patch.
> 
> Rather than "defensively" assign the input monitor control 
> (SOUND_MIXER_MONITOR) to an output, it'd be better to use a separate output 
> control, eg add a control for SOUND_MIXER_OGAIN, should it actually be 
> necessary.

hi, sorry for jumping in late: what is/is not now in 4.8-stable
as far as the patches go to make the Asus P4P800 work?

I get as far as:

[EMAIL PROTECTED] ~: dmesg| grep pcm
pcm0:  port 0xee80-0xeebf,0xe800-0xe8ff mem
0xfebff400-0xfebff4ff,0xfebff800-0xfebff9ff irq 10 at device 31.5 on pci0
pcm0: 
[EMAIL PROTECTED] ~: cat /dev/sndstat 
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0:  at io 0xfebff800, 0xfebff400 irq 10 bufsz 16384
(1p/1r/0v channels duplex)
[EMAIL PROTECTED] ~: 

But no sound, as reported earlier.

tnx,
Wilko
(who could use the PCI slot currently occupied by the sound
card for something else ;)

-- 
|   / o / /_  _ [EMAIL PROTECTED]
|/|/ / / /(  (_)  Bulte 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ASUS P4P800-VM + AD1980 (Was Re: VIA8235 + AD1980)

2003-08-19 Thread Orion Hodson
/-- Rudolf Cejka wrote:
| Rudolf Cejka wrote (2003/08/18):
| >   my "another machine" is at home, so I will be sure about your patch
| > tomorrow and I will send you another mail, however it looks reasonably.
| > Maybe just for "defensive programming" wouldn't it be "safer" to switch
| > values instead of assignment? Maybe there are some boards, which can use
| > both outputs...
| 
| So, I have tested your patch (machine with AD1885) and it works for me,
| however it would be really better to switch values instead of assignment
| even in my case just with HP_OUT connected. With an assignment, it is
| possible to control main volume by two independent controls,
| SOUND_MIXER_VOLUME and SOUND_MIXER_MONITOR, and if I change one of them,
| then there is an inconsistency between the real volume state and the other
| control.

Thank you for the info regarding the patch.

Rather than "defensively" assign the input monitor control 
(SOUND_MIXER_MONITOR) to an output, it'd be better to use a separate output 
control, eg add a control for SOUND_MIXER_OGAIN, should it actually be 
necessary.

Cheers
- Orion


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ASUS P4P800-VM + AD1980 (Was Re: VIA8235 + AD1980)

2003-08-19 Thread Rudolf Cejka
Rudolf Cejka wrote (2003/08/18):
>   my "another machine" is at home, so I will be sure about your patch
> tomorrow and I will send you another mail, however it looks reasonably.
> Maybe just for "defensive programming" wouldn't it be "safer" to switch
> values instead of assignment? Maybe there are some boards, which can use
> both outputs...

So, I have tested your patch (machine with AD1885) and it works for me,
however it would be really better to switch values instead of assignment
even in my case just with HP_OUT connected. With an assignment, it is
possible to control main volume by two independent controls,
SOUND_MIXER_VOLUME and SOUND_MIXER_MONITOR, and if I change one of them,
then there is an inconsistency between the real volume state and the other
control.

Best regards.

-- 
Rudolf Cejka  http://www.fit.vutbr.cz/~cejkar
Brno University of Technology, Faculty of Information Technology
Bozetechova 2, 612 66  Brno, Czech Republic
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ASUS P4P800-VM + AD1980 (Was Re: VIA8235 + AD1980)

2003-08-18 Thread Rudolf Cejka
Orion Hodson wrote (2003/08/17):
> There's a patch below that should help with this case - let
> me know how you go as I have no similar h/w.

Hello,
  my "another machine" is at home, so I will be sure about your patch
tomorrow and I will send you another mail, however it looks reasonably.
Maybe just for "defensive programming" wouldn't it be "safer" to switch
values instead of assignment? Maybe there are some boards, which can use
both outputs...

My home machine is 4.8-RELEASE and

pcm0:  port 0xef00-0xef3f,0xe800-0xe8ff irq 9
  at device 31.5 on pci0
pcm0: 

and it seems that registers are again according to the specification,
AD1885 in this case:

ich_rdcd(0x00): 0x0410
ich_rdcd(0x04): 0x8000
ich_rdcd(0x28): 0x0001
ich_rdcd(0x38): 0x

Because of AD1885 use, there is no problem with source selection for
line out/hp out as in AD1980 case, because there is not any source switch
for AD1885 and both outputs are connected to the mixer output.
Hmm, documentation for AD1885 looks much better than for AD1980...

> The existing code does something already (ac97_fix_auxout in ac97.c),

Interesting, thanks ;o) and best regards.

-- 
Rudolf Cejka  http://www.fit.vutbr.cz/~cejkar
Brno University of Technology, Faculty of Information Technology
Bozetechova 2, 612 66  Brno, Czech Republic
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ASUS P4P800-VM + AD1980 (Was Re: VIA8235 + AD1980)

2003-08-17 Thread Orion Hodson
/-- Rudolf Cejka wrote:
| Orion Hodson wrote (2003/06/26):
| > Oleg, Well done on working out a working fix for this problem...
| > ... There are some comments inline below that may help.  
| > - Orion
| 
| Hello,
|   how did you solve it in the end? Recently, I have got my new
| machine with ASUS P4P800-VM with AD1980 and I came into exactly
| same problem with no sound. Oleg's patch was very good starting
| point how to get working sound and where to start ;o)

Yes, I'll commit it shortly.

| I have another machine with different problem: Output is good, however
| main volume is not adjusted by Master Volume (0x02) register, but by
| Headphone Volume (0x04) register (Monitor Volume in Aumix). 

There's a patch below that should help with this case - let
me know how you go as I have no similar h/w.

| It is just though, but maybe my and Oleg's machine is case 3 in
| 5.2.1 AUX_OUT Options and the another machine would be case 1 or 2,
| so that it is needed to implement checking procedure at the end of
| 5.2.1 AUX_OUT Options.  However, I have to access the another
| machine and check its chipset and registers first. If there is
| anybody with AD1980 chip too, it would be interesting to see content
| of 0x00, 0x04, 0x28, and 0x38 registers and experiences with current
| pcm driver.

The existing code does something already (ac97_fix_auxout in ac97.c),
but the available options are limited by the OSS mixer interface.

Kind Regards
- Orion
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


ASUS P4P800-VM + AD1980 (Was Re: VIA8235 + AD1980)

2003-08-15 Thread Rudolf Cejka
Orion Hodson wrote (2003/06/26):
> Oleg, Well done on working out a working fix for this problem...
> ... There are some comments inline below that may help.  
> - Orion

Hello,
  how did you solve it in the end? Recently, I have got my new
machine with ASUS P4P800-VM with AD1980 and I came into exactly
same problem with no sound. Oleg's patch was very good starting
point how to get working sound and where to start ;o)

> Oleg Sharoiko writes:
> > ...
> The gain setting method would need to check for whether the register
> was the AC97_MIXEXT_SURROUND and have a specific piece of code to deal
> with this case.

And it seems that it has something to do with 5.2.1 AUX_OUT Options in
ac97_r23.pdf, page 39. 

> | need some help. If I understood everything correctly than it happens
> | so that the sound somehow goes to surround dac. The question that I

It seems that problem is elsewhere: Manufacturers using AD1980 connect
as line out rather signal SURR_OUT/HP_OUT than LINE_OUT, because of its
higher power amplifiers. Important bit in Oleg's patch is HPSEL, not LOSEL
(atleast in my case). And HPSEL means that SURR_OUT/HP_OUT is driven by
mixer outputs instead of surround DACs.

I have another machine with different problem: Output is good, however
main volume is not adjusted by Master Volume (0x02) register, but by
Headphone Volume (0x04) register (Monitor Volume in Aumix). It is just
though, but maybe my and Oleg's machine is case 3 in 5.2.1 AUX_OUT Options
and the another machine would be case 1 or 2, so that it is needed to
implement checking procedure at the end of 5.2.1 AUX_OUT Options.
However, I have to access the another machine and check its chipset and
registers first. If there is anybody with AD1980 chip too, it would be
interesting to see content of 0x00, 0x04, 0x28, and 0x38 registers and
experiences with current pcm driver.

> | cannot answer: why it goes to surround dac? Unfortunately I don't
> | have via8235 spec. Myabe data are being put into wrong timeslots?

It does not seem so.

> The behaviour you are describing would be partially explained if
> channel spreading were enabled in the codec (2 channels spread to 6).
> This can be manually and automatically enabled (AD1980 rev 0 specs
> pages 25 and 27).

It does not seem to be this case. You can look at my dirty a bad
patches for -current and their output (however on my machine working
very well :o) in ftp://ftp.FreeBSD.cz/pub/FreeBSD-local/ad1980/ :

dmesg.txt - Verbose boot log from my machine
debug.txt - All reads and writes to AD1980 registers produced by printf()
  commands in ich_rdcd() and ich_wrcd() functions with read loop for
  all AD1980 registers in ad1980_patch() function during
  kldload/kldunoad snd_ich operation
ac97_patch.c.1.1.diff: Patch function which swaps sources for LINE_OUT
  and SURR_OUT/HP_OUT (just change for SURR_OUT/HP_OUT is needed) and
  changes main volume register to Surround Volume Register
ich.c.1.32.diff: Debugging output for read/write register operations
ac97.h.1.13.diff: Make muting work. This is very bad solution, but correct
  way is too hard for now and at first we have to agree on some things
  before correct solution is found
ac97.c.1.42.diff: Just call to ad1980_patch() added
ac97_patch.h.1.1.diff: Just prototype added

> Since the AD1980 is an ac97 2.3 codec and these codecs do jack sense
> detection, it's probably worth checking out the ac97 2.3 spec and
> writing some code to find out what the jack sense registers report as
> attached.

I tried many variants and register writes with channels spreading and
jack sense, but without any success in this direction.

Regards.

-- 
Rudolf Cejka  http://www.fit.vutbr.cz/~cejkar
Brno University of Technology, Faculty of Information Technology
Bozetechova 2, 612 66  Brno, Czech Republic
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"