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 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: Intel ICH5 (82801EB) port 0xee80-0xeebf,0xe800-0xe8ff mem
| 0xfebff400-0xfebff4ff,0xfebff800-0xfebff9ff irq 10 at device 31.5 on pci0
| pcm0: Analog Devices AD1985 AC97 Codec
| [EMAIL PROTECTED] ~: cat /dev/sndstat 
| FreeBSD Audio Driver (newpcm)
| Installed devices:
| pcm0: Intel ICH5 (82801EB) 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-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]


Re: VIA8235 + AD1980

2003-06-26 Thread Orion Hodson

Oleg

Well done on working out a working fix for this problem and apologies
for not answering the email you sent earlier.  It was one of several
lost in the inbox overflow whilst the recipient was busy elsewhere.
I'm also going to be offline until until July 7th and won't be able to
provide any further input for a little while.

There are some comments inline below that may help.  

- Orion

Oleg Sharoiko writes:
|
| There is a small problem with this patch: AC97_MIXEXT_SURROUND has
| seprate mute bits for right and left channels and I don't see how
| can they be implemented in FreeBSD.

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.

| I'd like to get to the roots of this problem and this is where I
| need some help. If I understood everything correctly than it happens
| so that the sound somehow goes to surround dac. The question that I
| cannot answer: why it goes to surround dac? Unfortunately I don't
| have via8235 spec. Myabe data are being put into wrong timeslots?

The driver was written from the VT8233 spec under NDA.  The driver
sets the AC97 slots for the multichannel register set - these are set
with the macros SLOT3 and SLOT4.

There are no documented registers for assigning the regular stereo
playback channels to different slots.

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).

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.


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


Re: Sound drivers

2003-03-18 Thread Orion Hodson

Bruce R. Montague wrote: 

 Hi, Lev Serebryakov asked:
 I want to write sound driver for FreeBSD (pcm bridge driver) ...
 Is here any documentation about pcm architecture?

 I wrote a pcm audio driver and tried to document things
 somewhat in a largish comment block and some web page
 doc, you should be able to get the kit and doc from:
 
 http://alumni.cse.ucsc.edu/~brucem/geode.html

 Hope this helps, please let me know if you find something
 missing or bogus!

You can also direct questions at the sound developers via [EMAIL PROTECTED] or 
here depending on whether you think other people might be interested in the 
info.

Kind Regards
- Orion





To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message


bus_space_alloc (formerly bus_space_foo)

2001-03-15 Thread Orion Hodson


Hi

I've been writing a driver for the S3 Sonicvibes audio card.  The card
is PCI, but has 7 io ports.  The PCI initialization stops after 5
ports have been mapped out (constants are hardcoded in sys/pci so
reasonable to assume this fits with PCI spec).  The netbsd version of
this driver uses bus_space_alloc to deal with the other two ports, but
that function never made it from NetBSD to FreeBSD.  Is there a
workaround or equivalent? Or a driver that deals with the same
problem?

[ What the code does just now is examine the initial 5 io port
  allocations and then pick 2 non-overlapping port spaces between them
  for the unallocated ports.  This is gross, but works for the time
  being (likely not future proof, but assumptions could be hardcoded to
  prevent driver loading if not met).  A snapshot of the driver is at
  http://www.cs.ucl.ac.uk/staff/O.Hodson/misc/s3vibes.c - playback
  works, recording maybe, XXX marks the spot of resource fun.  Feedback
  appreciated. ]

Kind Regards
- Orion.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message