The NetBSD Project

CVS log for src/sys/dev/hdaudio/hdaudio.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / hdaudio

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.18 / (download) - annotate - [select for diffs], Thu Apr 7 19:33:37 2022 UTC (9 months, 3 weeks ago) by andvar
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

fix various typos in comments.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Mar 28 12:33:21 2022 UTC (10 months ago) by riastradh
Branch: MAIN
Changes since 1.16: +3 -7 lines
Diff to previous 1.16 (colored)

driver(9): devsw_detach never fails.  Make it return void.

Prune a whole lotta dead branches as a result of this.  (Some logic
calling this is also wrong for other reasons; devsw_detach is final
-- you should never have any reason to decide to roll it back.  To be
cleaned up in subsequent commits...)

XXX kernel ABI change to devsw_detach signature requires bump

Revision 1.16 / (download) - annotate - [select for diffs], Sat Aug 7 16:19:11 2021 UTC (17 months, 3 weeks ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2
Changes since 1.15: +4 -5 lines
Diff to previous 1.15 (colored)

Merge thorpej-cfargs2.

Revision 1.15.2.1 / (download) - annotate - [select for diffs], Wed Aug 4 23:24:58 2021 UTC (17 months, 3 weeks ago) by thorpej
Branch: thorpej-cfargs2
Changes since 1.15: +4 -5 lines
Diff to previous 1.15 (colored) next main 1.16 (colored)

Adapt to CFARGS().

Revision 1.14.2.1 / (download) - annotate - [select for diffs], Sun Aug 1 22:42:22 2021 UTC (17 months, 4 weeks ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.14: +3 -2 lines
Diff to previous 1.14 (colored) next main 1.15 (colored)

Sync with HEAD.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jun 29 21:03:36 2021 UTC (19 months ago) by pgoyette
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base
Branch point for: thorpej-cfargs2
Changes since 1.14: +3 -2 lines
Diff to previous 1.14 (colored)

Rework the xxxVERBOSE option to share the common module-hook-based
verbose mechanism with MIIVERBOSE.  This reduces some duplicated code
and allows us to once again permit auto-unload of MIIVERBOSE.

Change details:
* Update dev/devlist2h.awk to accomodate miidevs, including generation
  of MII_STR_oui_model definitions and use of oui and model rather than
  vendor and product.  This also changes the compressed data in the
  xxxdevs_data.h files to uint32_t (since mii oui's are up to 6 hex
  digits long)
* Update a couple of phy drivers to use new calls to get verbose data
* Regen all of the xxxdevs{,_data}.h files (separate commit, coming
  very soon)
* Update mii/mii_verbose.[ch] and mii/mii_physubr.c to use the various
  DEV_VERBOSE_xxx macros
* Update the pci, usb, and hdaudio code as needed, to #include the
  xxxdevs.h files (in order to get the proper printf format strings)
* Since dev/dev_verbose.c now uses non-literal printf format strings,
  (to deal with the vendor/product vs oui/model issue), we need to
  make sure it gets compiled with -Wno-error=format-nonliteral, even
  in userland's libpci and librumpdev!
* Bump kernel version for the change in module interfaces

Welcome to 9.99.86!

XXX It might be useful in the future to extend the MII_STR_oui_model
XXX definitions to PCI as well (and perhaps USB and HDAUDIO).  This
XXX would allow for a single centralized location for the products'
XXX descriptions, rather than being dispersed among individual
XXX drivers' xxx_match tables.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Apr 24 23:36:54 2021 UTC (21 months ago) by thorpej
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Changes since 1.13: +6 -7 lines
Diff to previous 1.13 (colored)

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
  actually needed.
- Don't be explicit about what interface attribute is attaching if
  the device only has one.  (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
  situations, making is visibly easier to see when indirect config is
  in play, and allowing for future change in semantics.  (As of now,
  this is just a wrapper around config_match(), but that is an
  implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance.  This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).

Revision 1.13.2.3 / (download) - annotate - [select for diffs], Wed Mar 24 14:21:08 2021 UTC (22 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.13.2.2: +2 -5 lines
Diff to previous 1.13.2.2 (colored) to branchpoint 1.13 (colored) next main 1.14 (colored)

Don't filter interface attributes in rescan functions for devices that
carry only a single interface attribute.  The autoconfiguration machinery
already considers interface attributes when searching for possible parents.

Revision 1.13.2.2 / (download) - annotate - [select for diffs], Mon Mar 22 16:23:44 2021 UTC (22 months, 1 week ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.13.2.1: +2 -3 lines
Diff to previous 1.13.2.1 (colored) to branchpoint 1.13 (colored)

Audit CFARG_IATTR in config_found() calls, and remove it in situations
where the interface attribute is not ambiguous.

Revision 1.13.2.1 / (download) - annotate - [select for diffs], Mon Mar 22 02:01:00 2021 UTC (22 months, 1 week ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.13: +7 -4 lines
Diff to previous 1.13 (colored)

Mechanical conversion of config_found_sm_loc() -> config_found().
CFARG_IATTR usage needs to be audited.

Revision 1.11.2.1 / (download) - annotate - [select for diffs], Sun Jan 3 16:34:57 2021 UTC (2 years ago) by thorpej
Branch: thorpej-futex
Changes since 1.11: +17 -3 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

Sync w/ HEAD.

Revision 1.9.2.2 / (download) - annotate - [select for diffs], Mon Dec 28 20:21:54 2020 UTC (2 years, 1 month ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE
Changes since 1.9.2.1: +13 -3 lines
Diff to previous 1.9.2.1 (colored) to branchpoint 1.9 (colored) next main 1.10 (colored)

Pull up following revision(s) (requested by jmcneill in ticket #1166):

	sys/dev/hdaudio/hdaudio.c: revision 1.13

If the Subordinate Node Count returns 0 nodes, complain and return instead
of trying to kmem_zalloc 0 bytes later on.

Revision 1.9.2.1 / (download) - annotate - [select for diffs], Mon Dec 28 20:18:09 2020 UTC (2 years, 1 month ago) by martin
Branch: netbsd-9
Changes since 1.9: +6 -2 lines
Diff to previous 1.9 (colored)

Pull up following revision(s) (requested by jmcneill in ticket #1165):

	sys/dev/hdaudio/hdaudio.c: revision 1.12

Initialize DMA memory when allocating it. Should fix PR# 51734 (hdaudio
"RIRB timeout" on boot).

Revision 1.13 / (download) - annotate - [select for diffs], Mon Dec 28 19:31:43 2020 UTC (2 years, 1 month ago) by jmcneill
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base
Branch point for: thorpej-cfargs
Changes since 1.12: +13 -3 lines
Diff to previous 1.12 (colored)

If the Subordinate Node Count returns 0 nodes, complain and return instead
of trying to kmem_zalloc 0 bytes later on.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Dec 28 16:49:58 2020 UTC (2 years, 1 month ago) by jmcneill
Branch: MAIN
Changes since 1.11: +6 -2 lines
Diff to previous 1.11 (colored)

Initialize DMA memory when allocating it. Should fix PR# 51734 (hdaudio
"RIRB timeout" on boot).

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jun 11 02:39:30 2020 UTC (2 years, 7 months ago) by thorpej
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.10: +5 -5 lines
Diff to previous 1.10 (colored)

Update for proplib(3) API changes.

Revision 1.8.6.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:20 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.8.6.1: +0 -4 lines
Diff to previous 1.8.6.1 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.8.6.1 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:05 2020 UTC (2 years, 9 months ago) by martin
Branch: phil-wifi
Changes since 1.8: +21 -29 lines
Diff to previous 1.8 (colored)

Merge changes from current as of 20200406

Revision 1.9.4.1 / (download) - annotate - [select for diffs], Sat Feb 29 20:19:07 2020 UTC (2 years, 11 months ago) by ad
Branch: ad-namecache
Changes since 1.9: +21 -29 lines
Diff to previous 1.9 (colored) next main 1.10 (colored)

Sync with head.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Feb 8 00:14:06 2020 UTC (2 years, 11 months ago) by jmcneill
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3
Changes since 1.9: +21 -29 lines
Diff to previous 1.9 (colored)

Read GCAP and version regs after taking the controller out of reset. Fixes
stream counts on my Radeon HD 7850.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jul 26 11:13:46 2019 UTC (3 years, 6 months ago) by jmcneill
Branch: MAIN
CVS Tags: phil-wifi-20191119, netbsd-9-base, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, ad-namecache-base2, ad-namecache-base1, ad-namecache-base
Branch point for: netbsd-9, ad-namecache
Changes since 1.8: +2 -6 lines
Diff to previous 1.8 (colored)

Even though the spec says SRST should read back as 1 after being set, this
does not appear to be the case with QEMU when using single byte accesses.

Instead of printing an error and giving up, continue and try to leave
stream reset state even if setting SRST times out.

Revision 1.8.2.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:37:01 2017 UTC (5 years, 1 month ago) by jdolecek
Branch: tls-maxphys
Changes since 1.8.2.1: +1652 -0 lines
Diff to previous 1.8.2.1 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored)

update from HEAD

Revision 1.4.10.3 / (download) - annotate - [select for diffs], Mon Nov 27 10:21:26 2017 UTC (5 years, 2 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1
Changes since 1.4.10.2: +23 -30 lines
Diff to previous 1.4.10.2 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Pull up following revision(s) (requested by jmcneill in ticket #391):
	sys/dev/hdaudio/hdaudio.c: revision 1.7
	sys/dev/hdaudio/hdaudio.c: revision 1.8
Always access CORBCTL using hda_read1/hda_write1 (it is an 8-bit wide reg).
Reported by Michal Necasek.
Always go through RIRB startup process, initialize RIRB interrupt count
register, and ack RIRBs as we process them in polling mode.
XXX pullup

Revision 1.8.2.1, Fri Nov 24 17:51:10 2017 UTC (5 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.8: +0 -1652 lines
FILE REMOVED

file hdaudio.c was added on branch tls-maxphys on 2017-12-03 11:37:01 +0000

Revision 1.8 / (download) - annotate - [select for diffs], Fri Nov 24 17:51:10 2017 UTC (5 years, 2 months ago) by jmcneill
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, phil-wifi-base, phil-wifi-20190609, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, jdolecek-ncqfixes-base, jdolecek-ncqfixes, isaki-audio2-base, isaki-audio2
Branch point for: tls-maxphys, phil-wifi
Changes since 1.7: +19 -26 lines
Diff to previous 1.7 (colored)

Always go through RIRB startup process, initialize RIRB interrupt count
register, and ack RIRBs as we process them in polling mode.

XXX pullup

Revision 1.7 / (download) - annotate - [select for diffs], Fri Nov 24 14:00:04 2017 UTC (5 years, 2 months ago) by jmcneill
Branch: MAIN
Changes since 1.6: +6 -6 lines
Diff to previous 1.6 (colored)

Always access CORBCTL using hda_read1/hda_write1 (it is an 8-bit wide reg).
Reported by Michal Necasek.

Revision 1.4.10.2 / (download) - annotate - [select for diffs], Fri Nov 24 08:35:34 2017 UTC (5 years, 2 months ago) by martin
Branch: netbsd-8
Changes since 1.4.10.1: +16 -14 lines
Diff to previous 1.4.10.1 (colored) to branchpoint 1.4 (colored)

Pull up following revision(s) (requested by jmcneill in ticket #388):
	sys/dev/hdaudio/hdaudio.c: revision 1.6
Enter link reset even if GCTL says we are already in reset state. Fixes
hdaudio codec detection under VirtualBox on a "cold" boot.
XXX pullup

Revision 1.6 / (download) - annotate - [select for diffs], Fri Nov 24 00:30:29 2017 UTC (5 years, 2 months ago) by jmcneill
Branch: MAIN
Changes since 1.5: +16 -14 lines
Diff to previous 1.5 (colored)

Enter link reset even if GCTL says we are already in reset state. Fixes
hdaudio codec detection under VirtualBox on a "cold" boot.

XXX pullup

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Mon Aug 28 17:52:02 2017 UTC (5 years, 5 months ago) by skrll
Branch: nick-nhusb
Changes since 1.1.2.5: +32 -7 lines
Diff to previous 1.1.2.5 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

Sync with HEAD

Revision 1.4.10.1 / (download) - annotate - [select for diffs], Mon Jun 5 08:13:05 2017 UTC (5 years, 7 months ago) by snj
Branch: netbsd-8
CVS Tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Changes since 1.4: +32 -7 lines
Diff to previous 1.4 (colored)

Pull up following revision(s) (requested by pgoyette in ticket #6):
	sys/dev/hdaudio/hdaudio.c: revision 1.5
	sys/dev/pci/hdaudio_pci.c: revision 1.8
Move the hdaudio_cd out of the hdaudio_pci module and into the main
hdaudio module.  Rearrange the inter-module dependencies accordingly.
Should resolve (my) PR kern/49836

Revision 1.5 / (download) - annotate - [select for diffs], Sun Jun 4 23:34:55 2017 UTC (5 years, 7 months ago) by pgoyette
Branch: MAIN
CVS Tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825
Changes since 1.4: +32 -7 lines
Diff to previous 1.4 (colored)

Move the hdaudio_cd out of the hdaudio_pci module and into the main
hdaudio module.  Rearrange the inter-module dependencies accordingly.

Should resolve (my) PR kern/49836

XXX Pull-ups needed for netbsd-8 branch

Revision 1.4.8.2 / (download) - annotate - [select for diffs], Sat Apr 29 10:19:31 2017 UTC (5 years, 9 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.4.8.1: +2 -3 lines
Diff to previous 1.4.8.1 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Revise previous.  Rather than explicitly including <sys/localcount.h>
in all the places where {b,c}devsw is initialized, just include it
from <sys/conf.h>.  This avoids an include-sequence dependancy.

Revision 1.4.8.1 / (download) - annotate - [select for diffs], Sat Apr 29 09:17:59 2017 UTC (5 years, 9 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.4: +4 -2 lines
Diff to previous 1.4 (colored)

Add DEVSW_MODULE_INIT to existing device-driver modules, so that they
willl have a localcount defined and thus be permitted to load.  Without
a localcount, loading the module will return EINVAL.

XXX the dtrace and drm stuff might need to be fed back upstream?

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Sun Dec 27 12:09:49 2015 UTC (7 years, 1 month ago) by skrll
Branch: nick-nhusb
Changes since 1.1.2.4: +3 -4 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.4 / (download) - annotate - [select for diffs], Wed Dec 23 12:45:06 2015 UTC (7 years, 1 month ago) by jmcneill
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, netbsd-8-base, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: prg-localcount2, netbsd-8
Changes since 1.3: +3 -4 lines
Diff to previous 1.3 (colored)

get rid of HDAUDIO_FLAG_NO_STREAM_RESET hack

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Tue Sep 22 12:05:57 2015 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.1.2.3: +4 -3 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored)

Sync with HEAD

Revision 1.3 / (download) - annotate - [select for diffs], Sun Jul 26 17:54:33 2015 UTC (7 years, 6 months ago) by jmcneill
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921
Changes since 1.2: +4 -3 lines
Diff to previous 1.2 (colored)

Skip stream reset if HDAUDIO_FLAG_NO_STREAM_RESET flag is set.

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:07 2015 UTC (7 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.1.2.2: +6 -5 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored)

Sync with HEAD

Revision 1.2 / (download) - annotate - [select for diffs], Wed May 20 18:28:32 2015 UTC (7 years, 8 months ago) by riastradh
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.1: +3 -2 lines
Diff to previous 1.1 (colored)

Initialize dma.dma_sizereg to avoid copying uninitialized data later.

This field is not actually used here -- not clear it should be in
the hdaudio_dma structure at all.

Noted by Coverity, CID 979553.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:08 2015 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.1.2.1: +1631 -0 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

Sync with HEAD

Revision 1.1.2.1, Sat Mar 28 14:09:59 2015 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.1: +0 -1631 lines
FILE REMOVED

file hdaudio.c was added on branch nick-nhusb on 2015-04-06 15:18:08 +0000

Revision 1.1 / (download) - annotate - [select for diffs], Sat Mar 28 14:09:59 2015 UTC (7 years, 10 months ago) by jmcneill
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Branch point for: nick-nhusb

Split hdaudio and PCI attach glue. Even though the driver was written with
this separation in mind, all of the code lived in sys/dev/pci/hdaudio. Move
common parts to sys/dev/hdaudio and PCI attach glue to sys/dev/pci.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>