From owner-svn-src-stable@FreeBSD.ORG Thu Jul 5 15:39:31 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6432C1065672; Thu, 5 Jul 2012 15:39:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 352438FC22; Thu, 5 Jul 2012 15:39:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65FdVXQ081737; Thu, 5 Jul 2012 15:39:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65FdVOO081735; Thu, 5 Jul 2012 15:39:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201207051539.q65FdVOO081735@svn.freebsd.org> From: Alexander Motin Date: Thu, 5 Jul 2012 15:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238137 - stable/9/sys/dev/sound/pci/hda X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 15:39:31 -0000 Author: mav Date: Thu Jul 5 15:39:30 2012 New Revision: 238137 URL: http://svn.freebsd.org/changeset/base/238137 Log: MFC r238022: Remove 14 not very useful characters " HDA CODEC PCM" from HDA pcm device names to shorten them. PulseAudio reported to have problems with names longer then 63 chars and at least in XMMS long names are inconvinient. Approved by: re (kib) Modified: stable/9/sys/dev/sound/pci/hda/hdaa.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/pci/hda/hdaa.c ============================================================================== --- stable/9/sys/dev/sound/pci/hda/hdaa.c Thu Jul 5 15:38:32 2012 (r238136) +++ stable/9/sys/dev/sound/pci/hda/hdaa.c Thu Jul 5 15:39:30 2012 (r238137) @@ -6203,12 +6203,14 @@ hdaa_resume(device_t dev) static int hdaa_probe(device_t dev) { + const char *pdesc; char buf[128]; if (hda_get_node_type(dev) != HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO) return (ENXIO); - snprintf(buf, sizeof(buf), "%s Audio Function Group", - device_get_desc(device_get_parent(dev))); + pdesc = device_get_desc(device_get_parent(dev)); + snprintf(buf, sizeof(buf), "%.*s Audio Function Group", + (int)(strlen(pdesc) - 10), pdesc); device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } @@ -6565,6 +6567,7 @@ hdaa_pcm_probe(device_t dev) struct hdaa_pcm_devinfo *pdevinfo = (struct hdaa_pcm_devinfo *)device_get_ivars(dev); struct hdaa_devinfo *devinfo = pdevinfo->devinfo; + const char *pdesc; char chans1[8], chans2[8]; char buf[128]; int loc1, loc2, t1, t2; @@ -6610,8 +6613,9 @@ hdaa_pcm_probe(device_t dev) t1 = -2; if (pdevinfo->digital) t1 = -2; - snprintf(buf, sizeof(buf), "%s PCM (%s%s%s%s%s%s%s%s%s)", - device_get_desc(device_get_parent(device_get_parent(dev))), + pdesc = device_get_desc(device_get_parent(dev)); + snprintf(buf, sizeof(buf), "%.*s (%s%s%s%s%s%s%s%s%s)", + (int)(strlen(pdesc) - 21), pdesc, loc1 >= 0 ? HDA_LOCS[loc1] : "", loc1 >= 0 ? " " : "", (pdevinfo->digital == 0x7)?"HDMI/DP": ((pdevinfo->digital == 0x5)?"DisplayPort":