#
516a9c02 |
| 03-Nov-2024 |
Christos Margiolis <christos@FreeBSD.org> |
sound: Make device registration more intuitive
The way a sound driver currently registers to sound(4) is using the following sequence of function calls:
1. pcm_register() to initialize snddev_info.
sound: Make device registration more intuitive
The way a sound driver currently registers to sound(4) is using the following sequence of function calls:
1. pcm_register() to initialize snddev_info. 2. pcm_addchan() calls to create the device's primary channels. 3. pcm_setstatus() to do the final setup.
While using 3 different functions in a specific order might not be very elegant, this pattern cannot be easily avoided. However, pcm_register() and pcm_setstatus() are especially confusing, since one would intuitively expect:
1. pcm_register() to actually do the registration, as opposed to a basic initialization. 2. pcm_setstatus() to, as the name suggests, set some kind of status, as opposed to finalizing the registration.
This patch renames pcm_register() to pcm_init(), and pcm_setstatus() to pcm_register(). Drivers are modified accordingly.
Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D47325
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0 |
|
#
837cd192 |
| 16-Jan-2024 |
Christos Margiolis <christos@FreeBSD.org> |
sound: remove PCM_KLDSTRING() and fix status strings
PCM_KLDSTRING() prints the kernel module associated with a given audio device only when that module is not compiled in. Get rid of PCM_KLDSTRING(
sound: remove PCM_KLDSTRING() and fix status strings
PCM_KLDSTRING() prints the kernel module associated with a given audio device only when that module is not compiled in. Get rid of PCM_KLDSTRING() altogether and print the driver name (even for modules that are compiled in) instead, as it implies the module as well.
While here, convert all status strings to the following dmesg-like format:
[<port|mem> <irq>] on <driver>
Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: markj, imp Differential Revision: https://reviews.freebsd.org/D43349
show more ...
|
Revision tags: release/14.0.0 |
|
#
5aacf339 |
| 18-Aug-2023 |
John Baldwin <jhb@FreeBSD.org> |
sys: Remove SND_DECLARE_FILE
Reviewed by: kbowling, imp, emaste Differential Revision: https://reviews.freebsd.org/D41499
|
#
82a265ad |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: sound driver version
Remove /SND_DECLARE_FILE\("\$FreeBSD\$"\);/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0 |
|
#
3390adfe |
| 07-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
sound: Remove unused devclass arguments to DRIVER_MODULE.
|
#
2287364e |
| 07-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
Remove pcm_devclass from DRIVER_MODULE invocations.
|
#
00254220 |
| 08-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
pcm emu10k1: Remove dead code in channel_setblocksize callbacks.
|
Revision tags: release/12.3.0 |
|
#
1f7a6325 |
| 05-Sep-2021 |
Alexander Motin <mav@FreeBSD.org> |
sound(4): Remove pointless Giant from bus_dma_tag_create().
None of the drivers really implement asynchronous buffer loading, so they don't need lock there. The only question is which of them have
sound(4): Remove pointless Giant from bus_dma_tag_create().
None of the drivers really implement asynchronous buffer loading, so they don't need lock there. The only question is which of them have BUS_DMA_NOWAIT flag there already, and to which it should be added.
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
378503af |
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
sound: clean up empty lines in .c and .h files
|
Revision tags: release/11.4.0 |
|
#
773bec08 |
| 27-Jan-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357119 through r357178.
|
#
c73222d0 |
| 26-Jan-2020 |
John Baldwin <jhb@FreeBSD.org> |
Fix some misleading indentation warnings reported by recent clang.
These should not be any functional change. While the change in emul10kx-pcm.c looks like a real bug fix (as opposed to inconsisten
Fix some misleading indentation warnings reported by recent clang.
These should not be any functional change. While the change in emul10kx-pcm.c looks like a real bug fix (as opposed to inconsistent whitespace), the extra statements were not harmful.
Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23363
show more ...
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
718cf2cc |
| 27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
Revision tags: release/10.4.0, release/11.1.0, release/11.0.1, release/11.0.0 |
|
#
9c831bbd |
| 13-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
#
87d8fcc8 |
| 12-Apr-2016 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
Replace 0 with NULL for pointers in misc. device drivers.
Found with devel/coccinelle.
|
#
d6084013 |
| 05-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
Revision tags: release/10.3.0 |
|
#
da1b038a |
| 18-Mar-2016 |
Justin Hibbits <jhibbits@FreeBSD.org> |
Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.
On some architectures, u_long isn't large enough for resource definitions. Particularly, powerpc and arm allow 36-bit (or larger) physic
Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.
On some architectures, u_long isn't large enough for resource definitions. Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but type `long' is only 32-bit. This extends rman's resources to uintmax_t. With this change, any resource can feasibly be placed anywhere in physical memory (within the constraints of the driver).
Why uintmax_t and not something machine dependent, or uint64_t? Though it's possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on 32-bit architectures. 64-bit architectures should have plenty of RAM to absorb the increase on resource sizes if and when this occurs, and the number of resources on memory-constrained systems should be sufficiently small as to not pose a drastic overhead. That being said, uintmax_t was chosen for source clarity. If it's specified as uint64_t, all printf()-like calls would either need casts to uintmax_t, or be littered with PRI*64 macros. Casts to uintmax_t aren't horrible, but it would also bake into the API for resource_list_print_type() either a hidden assumption that entries get cast to uintmax_t for printing, or these calls would need the PRI*64 macros. Since source code is meant to be read more often than written, I chose the clearest path of simply using uintmax_t.
Tested on a PowerPC p5020-based board, which places all device resources in 0xfxxxxxxxx, and has 8GB RAM. Regression tested on qemu-system-i386 Regression tested on qemu-system-mips (malta profile)
Tested PAE and devinfo on virtualbox (live CD)
Special thanks to bz for his testing on ARM.
Reviewed By: bz, jhb (previous) Relnotes: Yes Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D4544
show more ...
|
Revision tags: release/10.2.0, release/10.1.0 |
|
#
246e7a2b |
| 02-Sep-2014 |
Neel Natu <neel@FreeBSD.org> |
IFC @r269962
Submitted by: Anish Gupta (akgupt3@gmail.com)
|
#
ee7b0571 |
| 19-Aug-2014 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge head from 7/28
|
#
1b833d53 |
| 13-Aug-2014 |
Alexander V. Chernikov <melifaro@FreeBSD.org> |
Sync to HEAD@r269943.
|
Revision tags: release/9.3.0 |
|
#
86843ea8 |
| 17-Jun-2014 |
John Baldwin <jhb@FreeBSD.org> |
Fix various bugs with freeing static DMA allocations in sound drivers: - Don't compare the DMA map to NULL to determine if bus_dmamap_unload() should be called when releasing a static allocation.
Fix various bugs with freeing static DMA allocations in sound drivers: - Don't compare the DMA map to NULL to determine if bus_dmamap_unload() should be called when releasing a static allocation. Instead, compare the bus address against 0. - Don't assume that the DMA map for static allocations is NULL. Instead, save the value set by bus_dmamem_alloc() so it can later be passed to bus_dmamem_free(). Also, add missing calls to bus_dmamap_unload() in these cases before freeing the buffer. - Use the bus address from the bus_dma callback instead of calling vtophys() on the address allocated by bus_dmamem_alloc().
Reviewed by: kan
show more ...
|
#
bdec45e2 |
| 28-May-2014 |
Marius Strobl <marius@FreeBSD.org> |
Actually, just merge r233362 and do away with the unnecessary uint8_t pointer casting altogether.
|
#
50253ed9 |
| 28-May-2014 |
Marius Strobl <marius@FreeBSD.org> |
Commit the right version of r266793.
|
#
3ac12483 |
| 28-May-2014 |
Marius Strobl <marius@FreeBSD.org> |
- Fix compilation with PAE support enabled by improving the casting of physical addresses. - Nuke the unused softc of emujoy(4). - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers.
MFC afte
- Fix compilation with PAE support enabled by improving the casting of physical addresses. - Nuke the unused softc of emujoy(4). - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers.
MFC after: 3 days Sponsored by: Bally Wulff Games & Entertainment GmbH
show more ...
|
Revision tags: release/10.0.0 |
|
#
0bfd163f |
| 18-Oct-2013 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Merge head r233826 through r256722.
|