Commit Graph

1315 Commits

Author SHA1 Message Date
Andrew Thompson
afbfddd901 - add support for more than 2 audio channels. [1]
- add support for more sample rates

Submitted by:	[1] ariff (earlier version), Hans Petter Selasky
2009-12-22 02:11:37 +00:00
Alexander Motin
1969c3f4ea Add one more set of codec IDs. 2009-12-11 00:38:13 +00:00
Alexander Motin
eb3d6abdf9 Add two Cirrus Logic codec IDs.
Add GPIO setting quirk for Apple MacBookPro5,5.

Submitted by:	ed
2009-11-26 20:25:57 +00:00
Andrew Thompson
dc6942514b add support for MIDI devices without audio control stream.
Submitted by:	Hans Petter Selasky
2009-11-22 21:26:27 +00:00
Andrew Thompson
7fb4357098 remove volume alignment (was previously not correctly implemented)
Submitted by:	HPS
Reported by:	Jaakko Heinonen
2009-11-20 09:00:38 +00:00
Alexander Motin
a1c0421a4a Add more codec IDs. 2009-11-13 21:06:33 +00:00
Andrew Thompson
b029f6bb95 Improve support for High-speed USB audio devices.
- fix issues regarding the mixer, where the interface number was not set in
  time.
- fix wrong use of resolution parameter.

Submitted by:	Hans Petter Selasky
2009-11-08 21:00:50 +00:00
Alexander Motin
2ad05ba238 Fix typo in previous commit.
Add Realtek ALC887 codec ID.
2009-09-30 11:05:12 +00:00
Alexander Motin
ef0097a6aa Add some bits of HDMI/DisplayPort support from later specification updates.
It may be not enough to make them work, but at least should give some
information about these beasts.
2009-09-29 09:36:38 +00:00
Joel Dahl
2ee4e98c7e Move es137x.c and es137x.h to a 2-clause BSD license. Also move a few
comments.

Submitted by:	Joachim Kuebart
Approved by:	core, Russell Cattelan <cattelan@thebarn.com>
2009-09-22 13:23:59 +00:00
Marius Strobl
eb811915d2 - According to Linux, the ALi M5451 can do 31-bit DMA instead of just
30-bit like the reset of the controllers supported by this driver.
  Actually ALi M5451 can be setup up to generate 32-bit addresses by
  setting the 31st bit via the accompanying ISA bridge, which allows
  it to work in sparc64 machines whose IOMMU require at least 32-bit
  DMA. Even though other architectures would also benefit from 32-bit
  DMA, enabling this bit is limited to sparc64 as bus_dma(9) doesn't
  generally guarantee that a low address of BUS_SPACE_MAXADDR_32BIT
  results in a buffer in the 32-bit range.
- According to Tatsuo YOKOGAWA's ali(4), the the DMA transfer size of
  ALi M5451 is fixed to 64k and in fact using the default size of 4k
- The 4DWAVE DX and NX require the recording buffer to be 8-byte
  aligned so adjust the bus_dma_tag_create(9) accordingly.
- Unlike the rest of the controllers supported by this driver, the
  ALi M5451 only has 32 hardware channels instead of 64 so limit the
  loop in tr_intr() accordingly. [1]

Submitted by:	yongari [1]
Reviewed by:	yongari (superset of what is committed)
MFC after:	3 days
2009-09-22 11:38:45 +00:00
Alexander Motin
f66de33a6a Add NVidia MCP89 HDA controller IDs. 2009-09-09 04:48:41 +00:00
Alexander Motin
f147bd6d3d Add Intel 82801JD (one more ICH10) HDA controller ID.
Submitted by:	yongari
2009-09-09 04:36:56 +00:00
Alexander Motin
46681d6e45 Improve HDA controller capabilities logging. 2009-09-02 11:39:19 +00:00
Alfred Perlstein
f24b6817d6 Remove redundant Giant reference. Giant will be dropped
automatically when the mutex argument is NULL.

Reported by: Various people
Submitted by: hps
2009-08-24 04:57:48 +00:00
John Baldwin
a56fe095f0 Temporarily revert the new-bus locking for 8.0 release. It will be
reintroduced after HEAD is reopened for commits by re@.

Approved by:	re (kib), attilio
2009-08-20 19:17:53 +00:00
Attilio Rao
444b91868b Make the newbus subsystem Giant free by adding the new newbus sxlock.
The newbus lock is responsible for protecting newbus internIal structures,
device states and devclass flags. It is necessary to hold it when all
such datas are accessed. For the other operations, softc locking should
ensure enough protection to avoid races.

Newbus lock is automatically held when virtual operations on the device
and bus are invoked when loading the driver or when the suspend/resume
take place. For other 'spourious' operations trying to access/modify
the newbus topology, newbus lock needs to be automatically acquired and
dropped.

For the moment Giant is also acquired in some key point (modules subsystem)
in order to avoid problems before the 8.0 release as module handlers could
make assumptions about it. This Giant locking should go just after
the release happens.

Please keep in mind that the public interface can be expanded in order
to provide more support, if there are really necessities at some point
and also some bugs could arise as long as the patch needs a bit of
further testing.

Bump __FreeBSD_version in order to reflect the newbus lock introduction.

Reviewed by:    ed, hps, jhb, imp, mav, scottl
No answer by:   ariff, thompsa, yongari
Tested by:      pho,
                G. Trematerra <giovanni dot trematerra at gmail dot com>,
                Brandon Gooch <jamesbrandongooch at gmail dot com>
Sponsored by:   Yahoo! Incorporated
Approved by:	re (ksmith)
2009-08-02 14:28:40 +00:00
Alfred Perlstein
3d11bc19a0 USB audio:
- code factoring patch from "Eygene Ryabinkin"
- P4 ID: 166149

Submitted by:	hps
Approved by:	re
2009-07-30 00:14:56 +00:00
Alexander Motin
5487ee5507 Disable MSI by default for nVidia MCP55 chipset.
It is reported to be broken in the same way as MCP51.

PR:		kern/136429
Approved by:	re (kib)
2009-07-14 19:18:31 +00:00
Ariff Abdullah
df41a638f7 - Do aggresive saturation on various polynomial interpolators.
This dramatically pushing 99.9% interpolations and quantizations
  error _below_ -180dB on 32bit dynamic range, resulting extremely
  high quality conversion.
- Use BSPLINE interpolator for filter oversampling factor greater or
  equal than 64 (log2 6).

Approved by:	re (kib)
2009-07-14 18:53:34 +00:00
Marcel Moolenaar
c5e2d1885c Isochronous transfers only have 1 frame buffer, but multiple
frame lengths. The frame buffer is at index 0.

Approved by:	re (kensmith)
Obtained from:	HPS
2009-07-12 16:50:32 +00:00
Ariff Abdullah
5c663ce9cf Rearrange shift operation to increase interpolation accuracy,
further reducing conversion artifacts and better worst case SNR.

Approved by:	re (kib)
2009-07-09 22:21:18 +00:00
Ariff Abdullah
96831ae59b - Increase dynamic range of filter coefficients from 28bit to 30bit.
This cause dramatic effect in overall precision and conversion quality
  by pushing down most aliasing artifacts around -180 dB.

  Spectrogram analysis/comparison:

  	http://people.freebsd.org/~ariff/z_comparison/z_28vs30/

- Guard against possible 64bit overflow during accumulation process by
  slightly normalize and saturate sample and coefficient multiplication,
  possible during extreme 32bit downsampling (eg. 380KHz -> 8KHz) with
  custom preset that require more than ~7000 taps filter (which is
  overkill).

- Add knobs through FEEDER_RATE_PRESETS to set dynamic range of filter
  coefficients/accumulator and prefered polynomial interpolator:

  	COEFFICIENT_BIT:X
	(where 1 <= X <= 30, default: 30)

	ACCUMULATOR_BIT:X
	(where 32 <= X <=64, default: 58)

	INTERPOLATOR:I
	(where I = ZOH, LINEAR, QUADRATIC, HERMITE, BSPLINE,
 	           OPT32X, OPT16X, OPT8X, OPT4X, OPT2X)

Approved by:	re (kib)
2009-07-05 18:15:06 +00:00
Andrew Thompson
7e6e6b6766 Use the correct mutex in umidi_open()
Submitted by:	Hans Petter Selasky
Approved by:	re (kib)
2009-06-27 21:21:11 +00:00
Konstantin Belousov
9f80ce043d Change the type of uio_resid member of struct uio from int to ssize_t.
Note that this does not actually enable full-range i/o requests for
64 architectures, and is done now to update KBI only.

Tested by:	pho
Reviewed by:	jhb, bde (as part of the review of the bigger patch)
2009-06-25 18:46:30 +00:00
Alexander Motin
8380c28e5a Some DMA related changes:
- honor parent DMA tag limitations, as man page requires,
 - allow data buffer to be allocated within full 64bit address range, when
   support is announced by hardware,
 - add quirk, disabling 64bit addresses for broken chips, use it for MCP78.
2009-06-24 17:03:06 +00:00
Ariff Abdullah
f3bf5def20 Slight comment fix. 2009-06-24 02:01:16 +00:00
Andrew Thompson
8f9e0ef947 Fix a typeo in the frame len function to unbreak the build, make it shorter
while I am here.
2009-06-23 06:00:31 +00:00
Andrew Thompson
ed6d949afd - Make struct usb_xfer opaque so that drivers can not access the internals
- Reduce the number of headers needed for a usb driver, the common case is just   usb.h and usbdi.h
2009-06-23 02:19:59 +00:00
Ariff Abdullah
164e1f20ec - Add a way to change filter oversampling factor through
FEEDER_RATE_PRESET "OVERSAMPLING_FACTOR:X .. .." where
  X = log2(oversampling factor).

- Lower down default filter oversampling factor from 128
  (log2 = 7) to 32 (log2 = 5), saving worth of 80 Kb.
  The use of better polynomial interpolator will raise
  its conversion quality/accuracy to match (or slightly
  better) with previous settings.

- Bump driver version.
2009-06-15 04:31:34 +00:00
Ariff Abdullah
eedb75f16b Remap type of polynomial interpolators for better polyphase
coefficients quality:
- Linear interpolator for oversampling factor larger and equal
  than 4096 (log2 = 12).
- Quadratic interpolator for oversampling factor larger and equal
  than 256 (log2 = 8).

Default oversampling factor (128 ~ log2 = 7) will use OPT32X, which
provides better accuracy.
2009-06-15 04:05:38 +00:00
Andrew Thompson
a593f6b8de s/usb2_/usb_|usbd_/ on all function names for the USB stack. 2009-06-15 01:02:43 +00:00
Alexander Motin
ff0ef2c596 Fix type of lowaddr variable. 2009-06-14 07:34:21 +00:00
Ariff Abdullah
5870e3c990 Remove custom KOBJMETHOD(), CHANNEL_DECLARE() and MIXER_DECLARE()
(enabled with SND_DEBUG) that was intended to provoke build failure
due to inconsistencies.
2009-06-11 09:06:09 +00:00
Ariff Abdullah
5cda20cfdb Move machine dependant AFMT_* definition from sound.h
to global soundcard.h .
2009-06-10 03:56:24 +00:00
Ariff Abdullah
c7215acf82 Fix compile time warning on sparc64, thanks to strict kobj signatures checking.
Noticed by:	bz
2009-06-08 23:24:01 +00:00
Ariff Abdullah
d88ff2a221 Fix powerpc build failure due to strict kobj signatures checking. 2009-06-08 08:10:52 +00:00
Ariff Abdullah
c5c15a7b9a Fix build on sparc64.
Pointy hat:	ariff@
2009-06-07 23:38:16 +00:00
Ariff Abdullah
db77ea6c22 Bump driver revision (should have bumped it earlier). 2009-06-07 19:36:25 +00:00
Ariff Abdullah
90da2b2859 Sound Mega-commit. Expect further cleanup until code freeze.
For a slightly thorough explaination, please refer to
	[1] http://people.freebsd.org/~ariff/SOUND_4.TXT.html .

Summary of changes includes:

1 Volume Per-Channel (vpc).  Provides private / standalone volume control
  unique per-stream pcm channel without touching master volume / pcm.
  Applications can directly use SNDCTL_DSP_[GET|SET][PLAY|REC]VOL, or for
  backwards compatibility, SOUND_MIXER_PCM through the opened dsp device
  instead of /dev/mixer.  Special "bypass" mode is enabled through
  /dev/mixer which will automatically detect if the adjustment is made
  through /dev/mixer and forward its request to this private volume
  controller.  Changes to this volume object will not interfere with
  other channels.

  Requirements:
    - SNDCTL_DSP_[GET|SET][PLAY|REC]_VOL are newer ioctls (OSSv4) which
      require specific application modifications (preferred).
    - No modifications required for using bypass mode, so applications
      like mplayer or xmms should work out of the box.

  Kernel hints:
    - hint.pcm.%d.vpc (0 = disable vpc).

  Kernel sysctls:
    - hw.snd.vpc_mixer_bypass (default: 1).  Enable or disable /dev/mixer
      bypass mode.
    - hw.snd.vpc_autoreset (default: 1).  By default, closing/opening
      /dev/dsp will reset the volume back to 0 db gain/attenuation.
      Setting this to 0 will preserve its settings across device
      closing/opening.
    - hw.snd.vpc_reset (default: 0).  Panic/reset button to reset all
      volume settings back to 0 db.
    - hw.snd.vpc_0db (default: 45).  0 db relative to linear mixer value.

2 High quality fixed-point Bandlimited SINC sampling rate converter,
  based on Julius O'Smith's Digital Audio Resampling -
  http://ccrma.stanford.edu/~jos/resample/.  It includes a filter design
  script written in awk (the clumsiest joke I've ever written)
    - 100% 32bit fixed-point, 64bit accumulator.
    - Possibly among the fastest (if not fastest) of its kind.
    - Resampling quality is tunable, either runtime or during kernel
      compilation (FEEDER_RATE_PRESETS).
    - Quality can be further customized during kernel compilation by
      defining FEEDER_RATE_PRESETS in /etc/make.conf.

  Kernel sysctls:
    - hw.snd.feeder_rate_quality.
      0 - Zero-order Hold (ZOH).  Fastest, bad quality.
      1 - Linear Interpolation (LINEAR).  Slightly slower than ZOH,
          better quality but still does not eliminate aliasing.
      2 - (and above) - Sinc Interpolation(SINC).  Best quality.  SINC
          quality always start from 2 and above.

  Rough quality comparisons:
    - http://people.freebsd.org/~ariff/z_comparison/

3 Bit-perfect mode.  Bypasses all feeder/dsp effects.  Pure sound will be
  directly fed into the hardware.

4 Parametric (compile time) Software Equalizer (Bass/Treble mixer). Can
  be customized by defining FEEDER_EQ_PRESETS in /etc/make.conf.

5 Transparent/Adaptive Virtual Channel. Now you don't have to disable
  vchans in order to make digital format pass through.  It also makes
  vchans more dynamic by choosing a better format/rate among all the
  concurrent streams, which means that dev.pcm.X.play.vchanformat/rate
  becomes sort of optional.

6 Exclusive Stream, with special open() mode O_EXCL.  This will "mute"
  other concurrent vchan streams and only allow a single channel with
  O_EXCL set to keep producing sound.

Other Changes:
    * most feeder_* stuffs are compilable in userland. Let's not
      speculate whether we should go all out for it (save that for
      FreeBSD 16.0-RELEASE).
    * kobj signature fixups, thanks to Andriy Gapon <avg@freebsd.org>
    * pull out channel mixing logic out of vchan.c and create its own
      feeder_mixer for world justice.
    * various refactoring here and there, for good or bad.
    * activation of few more OSSv4 ioctls() (see [1] above).
    * opt_snd.h for possible compile time configuration:
      (mostly for debugging purposes, don't try these at home)
        SND_DEBUG
        SND_DIAGNOSTIC
        SND_FEEDER_MULTIFORMAT
        SND_FEEDER_FULL_MULTIFORMAT
        SND_FEEDER_RATE_HP
        SND_PCM_64
        SND_OLDSTEREO

Manual page updates are on the way.

Tested by:	joel, Olivier SMEDTS <olivier at gid0 d org>, too many
          	unsung / unnamed heroes.
2009-06-07 19:12:08 +00:00
Andrew Thompson
c737a63263 revert r162516. We only support 1 or 2 channels per stream
which reflects mono and stereo.

Submitted by:	Hans Petter Selasky
2009-06-04 21:59:28 +00:00
Alexander Motin
ba98ce6bad Comment out old Realtek ALC883 quirk, that was disabling phantop power on
mic inputs. I have no idea what for it was made that time, but now I have
several reports that it should be removed to make microphones work. If
this quirk is still required for some systems then they should be identified
and specified explicitly.
2009-06-01 13:13:47 +00:00
Andrew Thompson
e0a69b51ac s/usb2_/usb_/ on all typedefs for the USB stack. 2009-05-29 18:46:57 +00:00
Andrew Thompson
760bc48e7e s/usb2_/usb_/ on all C structs for the USB stack. 2009-05-28 17:36:36 +00:00
Andrew Thompson
1ff7682866 Provide a workaround for USB devices that do not support mono or stereo
operation by overriding the channel count.

Submitted by:	Hans Petter Selasky
Reported by:	MIHIRA Sanpei Yoshiro
2009-05-27 19:45:04 +00:00
Joel Dahl
999da77859 Slightly adjust copyright text.
Approved by:	Hannu Savolainen <hannu@opensound.com>
2009-05-27 18:17:58 +00:00
Joel Dahl
40ac6e1726 Slightly adjust copyright text.
Approved by:	luigi
2009-05-27 18:16:53 +00:00
Joel Dahl
f2907a755d Separate comments from the license text. 2009-05-27 18:13:15 +00:00
Andrew Thompson
fadc970b77 Fix a few variable renames of usb2_mode outside dev/usb. 2009-05-21 02:09:12 +00:00
Joel Dahl
498a9afee2 Slightly adjust copyright text.
Approved by:	matk
2009-05-20 18:38:43 +00:00
Joel Dahl
e05a128eb7 Remove license clauses 3 and 4 as per rev. 1.65 of midi.c in NetBSD.
Approved by:	matk
2009-05-20 18:34:26 +00:00
Joel Dahl
4367b59545 Remove license clauses 3 and 4 as per rev. 1.65 of auvia.c in NetBSD. 2009-05-20 18:31:11 +00:00
Joel Dahl
1d631ee69a Remove license clauses 3 and 4 as per rev. 1.112 of uaudio.c and rev. 1.15 of
uaudioreg.h in NetBSD.
2009-05-20 18:15:13 +00:00
Joel Dahl
ba55ca9732 Remove license clauses 3 and 4 as per rev. 1.12 of cs4231reg.h in NetBSD. 2009-05-20 18:04:56 +00:00
Alexander Motin
6e8e2779b3 Add one more board ID with inverted external amplifier control.
PR:		kern/121156
2009-05-08 03:19:57 +00:00
Stanislav Sedov
219c5a5a96 - Unlock softc mutex on failure.
MFC after:	1 week
2009-04-20 13:15:25 +00:00
Stanislav Sedov
852761c216 - Properly unlock mutex on failure in channel_trigger. Before this
the function just returned with the mutex held.

MFC after:	1 week
2009-04-20 12:43:07 +00:00
Andrew Thompson
4eae601ebd MFp4 //depot/projects/usb@159909
- make usb2_power_mask_t 16-bit
- remove "usb2_config_sub" structure from "usb2_config". To compensate for this
  "usb2_config" has a new field called "usb_mode" which select for which mode
  the current xfer entry is active. Options are: a) Device mode only b) Host
  mode only (default-by-zero) c) Both modes.  This change was scripted using
  the following sed script: "s/\.mh\././g".
- the standard packet size table in "usb_transfer.c" is now a function, hence
  the code for the function uses less memory than the table itself.

Submitted by:	Hans Petter Selasky
2009-04-05 18:20:38 +00:00
Alexander Motin
cb11662602 Add some more logic for AD1986A codec input tracing. Use mic preamplifier
only for mic-type inputs. This gives better chances to use it.

Change default configuration for some AD1986A codec based ASUS boards,
use it also for ASUS P5PL2 board. This makes front mic preamplifier working.

Tested by:	Vadim Frolov <frolov@frolov.ck.ua>
2009-04-01 18:55:08 +00:00
Alexander Motin
f7cdd867ec Fixup relative pointers after channel realloc. It fixes crash on systems
with several HDA codecs per controller.

While I am there, remove some unneeded dereferences.

Submitted by:	Tor Egge <Tor.Egge@cvsup.no.freebsd.org>
2009-03-29 07:10:52 +00:00
Alexander Motin
83c59ed283 Remove CD input hack for ALC268 based Acer systems. Latest systems does not
implement CD input in hardware, while unconditional showing it confuse users.
Also it was made in the way that sometimes improper with present driver.

Add patch for ALC268 based Acer TM5320 to make headphones jack sensing work.
Default configuration defines two separate playback associations, which
current driver unable to trace properly due to order they are defined and
limited codec uniformity.

Submitted by:	G. Mirov <g.mirov AT gmail.com>
2009-03-16 15:50:29 +00:00
Alexander Motin
ad7de3aafb Fix spelling in message. 2009-03-16 12:42:23 +00:00
Warner Losh
155a83e87a remove now-redunant cardbus attachment. 2009-03-09 13:23:54 +00:00
Andrew Thompson
9aef556d71 Rename the ushub device class back to uhub as it was in the old usb stack,
moused(8) looks for "uhub/ums" to decide if needs to load the module.

Reported by:	Garrett Cooper
2009-03-02 05:37:05 +00:00
Alexander Motin
8363eacca1 Copy/paste bug fix for previos commit. 2009-02-27 23:49:26 +00:00
Andrew Thompson
ee3e3ff5c2 Change USB over to make_dev() for all device nodes, previously it hooked into
the devfs clone handler to open the (invisible) devices on the fly.

The /dev entries are layed out as follows,

 /dev/usbctl      = master device
 /dev/usb/0.1.0.5 = usb device, (<bus>.<dev>.<iface>.<endpoint>)
 /dev/ugen0.1 -> usb/0.1.0.0 = ugen link to ctrl endpoint

This also removes the custom permissions model from USB.  Bump
__FreeBSD_version to 800066.

Submitted by:	rink (earlier version)
2009-02-27 17:27:16 +00:00
Alexander Motin
edce9c994e Add MSI blacklisting support.
Disable MSI for nVidia MCP51 controller. Enabling MSI there leads to
unexpected errors and timeouts, that should not happen even if interrupts
are not working completely.
2009-02-26 20:00:14 +00:00
Andrew Thompson
3a3f90c6c3 Move the uaudio and ata-usb drivers into their correct locations. 2009-02-23 21:19:18 +00:00
Andrew Thompson
e02917222d Move two missed usb drivers out to the graveyard location under sys/legacy/dev. 2009-02-23 21:07:20 +00:00
Alexander Motin
8f740c4b03 Enable MSI support by default. Still can be disabled using device.hints. 2009-02-15 21:17:21 +00:00
Alexander Motin
c7a5ac775b s/succeded/succeeded/ in comments. 2009-02-12 09:37:45 +00:00
Alexander Leidinger
3141a8dcd1 All open fixes and improvements from Konstantin for which users had to
use patches so far:
 + Envy24:
   - fix: broken init data for M Audio Delta DiO 2496
   - add: support for M Audio Delta 44
   - add: support for M Audio Delta 1010LT
     Tested by:	Dominique Goncalves, dominique.goncalves at gmail.com
   - add: support for Terratec EWX 2496
     Tested by:	Stefan Sperling, stsp at stsp.name
   - add: support for M Audio Delta 66
     Tested by:	Richard Bown, richard.bown at blueyonder.co.uk
   - add: support for M Audio Delta 1010
     Tested by:	Andrew Reilly, areilly at bigpond.net.au
 + Envy24HT:
   - add: support for Terrasoniq TS22PCI
   - fix: M-Audio Revolution 5.1 sound volume is very low
     Reported by:	Oliver Hartmann, ohartman at zedat.fu-berlin.de
                 	Andrey Slusar, anrays at gmail.com
     Tested by:		Andrey Slusar, anrays at gmail.com
               		Rusu Silviu, arol.the at gmail.com
   - fix: M-Audio Revolution 7.1 sound is distorted and very quiet
     Reported by:	Olev Hannula, hannula at gmail.com
     Tested by:		Olev Hannula, hannula at gmail.com
               		Stanislav Belansky, stanislav at icmail.ru
   - fix: Terratec PHASE 22 codec is power-off due to wrong init data
     Reported by:	Philipp Ost, pj at smo.de
     Tested by:		Philipp Ost, pj at smo.de
 + SpicDS:
   - fix: AK4381 produce hiss sound on 192kHz sample rate
   - fix: stupid bug with volume control for AK4396

Submitted by:	 	Konstantin Dimitrov <kosio.dimitrov@gmail.com>
2009-02-11 10:29:45 +00:00
Olivier Houchard
cd5c163926 Hmm... "base? base : 0" and "base" should be equivalent.
Pointy hat to:	cognet

MFC after:	3 days
2009-02-09 22:59:22 +00:00
Nathan Whitehorn
9772bc0bec Rearrange this code slightly to pass softcs around instead of device_t,
solving a possible panic when snd_ai2s is loaded at boot time. Also change
the device setup to indicate to the pcm layer that the device is MPSAFE.

Submitted by:	Marco Trillo
Suggestions by: Ariff Abdullah
2009-02-07 01:15:13 +00:00
Alexander Motin
a05a433984 Fix bug in hint.hdac.X.config parsing. 2009-01-31 08:24:09 +00:00
Alexander Motin
18141fb27d Specify analog beep pin widget for several AD codecs.
It gives working speaker control for that systems.
2009-01-26 15:55:15 +00:00
Nathan Whitehorn
a808d0177a Change the way our softc is stored to use the devinfo facility provided by pcm
instead of the regular device softc interface. This brings the AOA driver in
line with the other pcm drivers.

Requested by:	ariff
2009-01-26 14:43:18 +00:00
Nathan Whitehorn
8486eb86a7 Add support for the I2S and davbus audio controllers found in Apple PowerPC
hardware.

Submitted by:	Marco Trillo
2009-01-25 18:20:15 +00:00
Alexander Motin
8e097e5b32 Add two more nVidia HDMI codec IDs. 2009-01-19 19:16:50 +00:00
Giorgos Keramidas
7efe59806b Add support for CMedia CMI120.
PR:		kern/123640
Approved by:	ariff
MFC after:	2 weeks
2009-01-18 04:29:42 +00:00
Alexander Motin
a1cfce010b Correct spelling in comment. 2009-01-13 23:03:07 +00:00
Alexander Motin
12f2031fd5 Improve AD1983 codec support:
- force playback via mixer to get PCM volume control,
 - make cleanup on recoring source selection.
2009-01-13 22:10:01 +00:00
Alexander Motin
01dd74a1ed Change configuration order to enable output only after codec is configured.
Mute all mixer controllable amplifiers initially to let mixer to unmute
only some of them later. This should reduce clicks and noises during boot.
2009-01-13 16:27:04 +00:00
Alexander Motin
56035520b7 Fix unwanted crosschannel mixing, possible on some codecs like
VIA VT1708B and Realtek ALC268.
2009-01-11 12:04:18 +00:00
Alexander Motin
530a1aa636 OSS tools expect EINVAL for unsupported ioctls, but not ENXIO. 2009-01-10 21:38:37 +00:00
Alexander Motin
609c69b731 Make devnode include full device path.
This makes OSSv4 osstest tool work.
2009-01-10 20:49:15 +00:00
Alexander Motin
ccaaa74562 Remove debug slipped with the previous commit. 2009-01-10 19:01:29 +00:00
Alexander Motin
52f6e09e09 Import some new constants and structures fields from OSSv4.
Implement some OSSv4 ioctls to make ossinfo tool work and print
something reasonable.
2009-01-10 18:19:22 +00:00
Alexander Motin
7f7de27152 Add one more bunch of controller and codec IDs. 2009-01-10 14:14:00 +00:00
Alexander Motin
78bb0fa358 Add external connector jack color into widget names.
It should help users to identify them while reading verbose messages.
2009-01-08 19:43:47 +00:00
Alexander Motin
c412d503cf Add some new oss_sysinfo structure fields from OSSv4. 2009-01-07 21:12:33 +00:00
Rong-En Fan
fb898a2cc2 - Remove snd_au88x0 which seems never got compiled into kernel nor as a kernel
module. These files cause manual interaction when building
  ports/audio/aureal-kmod which provides a usable i386-only driver (it requires
  linking against some linux object files distributed by vendor which bankrupted
  back in 2000).

MFC after:	1 week
2009-01-07 03:15:22 +00:00
Alexander Motin
f496eee7e3 Add some found NVidia MCP7x HDA controller IDs. 2008-12-27 11:00:20 +00:00
Alexander Motin
3f4f72bf2b Add some special handling for AD1986A codec:
Disable some unneeded pathes in overcomplicated input mixer to help parser
to handle the rest better. This gives mic input boost control in some
configurations and just more predictable operation in others.
2008-12-26 22:47:11 +00:00
Alexander Motin
51a8e5f0c3 Organize Conexant codecs.
Add CX20561 (Hermosa) codec ID.
2008-12-23 14:58:08 +00:00
Alexander Motin
fd9c95bdab Add 9 more Analog Devices codec names. 2008-12-22 22:40:17 +00:00
Alexander Motin
9678919ba4 Add ULI M5461 chipset and vendor ID. 2008-12-18 22:04:13 +00:00
Alexander Motin
1bc133fee9 Add some HDMI codec IDs. 2008-12-16 00:08:51 +00:00
Alexander Motin
13cf3e1bbe Add VIA VT1708B codec IDs. 2008-12-15 23:49:09 +00:00
Alexander Motin
b6562075bb Remove DELAY() on hdac_audio_commit().
I don't see the reason why it is needed.
2008-11-23 23:19:31 +00:00