Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/hdaudio Make sure that all vendor strings are shorte...



details:   https://anonhg.NetBSD.org/src/rev/0ba659776731
branches:  trunk
changeset: 1006763:0ba659776731
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Jan 27 00:51:15 2020 +0000

description:
Make sure that all vendor strings are shorter than 16 (MAX_AUDIO_DEV_LEN)
characters as the values are used in the AUDIO_GETDEV ioctl.

diffstat:

 sys/dev/hdaudio/hdaudiodevs |  19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diffs (37 lines):

diff -r 73db39fc64b3 -r 0ba659776731 sys/dev/hdaudio/hdaudiodevs
--- a/sys/dev/hdaudio/hdaudiodevs       Sun Jan 26 22:57:52 2020 +0000
+++ b/sys/dev/hdaudio/hdaudiodevs       Mon Jan 27 00:51:15 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: hdaudiodevs,v 1.2 2015/05/30 14:12:42 jmcneill Exp $
+$NetBSD: hdaudiodevs,v 1.3 2020/01/27 00:51:15 jmcneill Exp $
 
 /*
  * Copyright (c) 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -28,16 +28,21 @@
  * SUCH DAMAGE.
  */
 
-/* The following is duplicated from pci except SIGMATEL* and CMEDIA */
-vendor ATI             0x1002  ATI Technologies
+/*
+ * Try to keep vendor and product names 15 characters or less. They are
+ * used by the AUDIO_GETDEV ioctl and copied into buffers that are
+ * constrained by MAX_AUDIO_DEV_LEN (sys/audioio.h).
+ */
+
+vendor ATI             0x1002  ATI
 vendor NVIDIA          0x10de  NVIDIA
-vendor REALTEK         0x10ec  Realtek Semiconductor
-vendor VIATECH         0x1106  VIA TeCHnologies
+vendor REALTEK         0x10ec  Realtek
+vendor VIATECH         0x1106  VIA
 vendor SIGMATEL2       0x111d  Sigmatel
 vendor ANALOG          0x11d4  Analog Devices
-vendor CONEXANT        0x14f1  Conexant Systems
+vendor CONEXANT        0x14f1  Conexant
 vendor VMWARE          0x15ad  VMware
-vendor CMEDIA          0x434d  C-Media Electronics
+vendor CMEDIA          0x434d  C-Media
 vendor INTEL           0x8086  Intel
 vendor SIGMATEL        0x8384  Sigmatel
 



Home | Main Index | Thread Index | Old Index