From owner-freebsd-bugs@FreeBSD.ORG Tue May 13 20:00:13 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFE161065681 for ; Tue, 13 May 2008 20:00:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AD0DE8FC20 for ; Tue, 13 May 2008 20:00:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m4DK0DG9038812 for ; Tue, 13 May 2008 20:00:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m4DK0DhL038811; Tue, 13 May 2008 20:00:13 GMT (envelope-from gnats) Resent-Date: Tue, 13 May 2008 20:00:13 GMT Resent-Message-Id: <200805132000.m4DK0DhL038811@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Juan José del Río Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C57DD1065672 for ; Tue, 13 May 2008 19:52:24 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id B48F98FC21 for ; Tue, 13 May 2008 19:52:24 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m4DJpHmS009422 for ; Tue, 13 May 2008 19:51:17 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m4DJpH3h009421; Tue, 13 May 2008 19:51:17 GMT (envelope-from nobody) Message-Id: <200805131951.m4DJpH3h009421@www.freebsd.org> Date: Tue, 13 May 2008 19:51:17 GMT From: Juan José del Río To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/123640: [patch] snd_cmi driver now supports "C-Media INC. USB Sound Device" a.k.a. CMI120 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2008 20:00:13 -0000 >Number: 123640 >Category: kern >Synopsis: [patch] snd_cmi driver now supports "C-Media INC. USB Sound Device" a.k.a. CMI120 >Confidential: no >Severity: non-critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 13 20:00:13 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Juan José del Río >Release: 7.0-RELEASE >Organization: Simple Option S.L. >Environment: FreeBSD galileo.simpleoption.com 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Thu May 1 15:21:50 CEST 2008 root@galileo.simpleoption.com:/usr/src/sys/i386/compile/GENERIC i386 >Description: I plug my USB Speakers in FreeBSD and no pcm device is created. Grep'd dump of usbdevs -v : Controller /dev/usb1: addr 1: full speed, self powered, config 1, OHCI root hub(0x0000), ATI(0x0000), rev 1.00 port 1 addr 2: full speed, power 500 mA, config 1, USB Sound Device(0x0103), C-Media INC.(0x0d8c), rev 0.10 port 2 powered >How-To-Repeat: Plug in the speakers in a system using 7.0-RELEASE >Fix: I have patched sys/dev/sound/pci/cmi.c adding my DEVICE ID to the list of supported devices. The patch is attached to this PR. Just load the patched module, and plug in the USB. If it's already plugged, unplug and plug it again. Patch attached with submission follows: --- cmi.c~ 2008-05-13 21:35:37.000000000 +0200 +++ cmi.c 2008-05-13 21:35:04.000000000 +0200 @@ -60,6 +60,7 @@ #define CMI8338B_PCI_ID 0x010113f6 #define CMI8738_PCI_ID 0x011113f6 #define CMI8738B_PCI_ID 0x011213f6 +#define CMI120_USB_ID 0x01030d8c /* Buffer size max is 64k for permitted DMA boundaries */ #define CMI_DEFAULT_BUFSZ 16384 @@ -916,6 +917,9 @@ case CMI8738B_PCI_ID: device_set_desc(dev, "CMedia CMI8738B"); return BUS_PROBE_DEFAULT; + case CMI120_USB_ID: + device_set_desc(dev, "CMedia CMI120"); + return BUS_PROBE_DEFAULT; default: return ENXIO; } >Release-Note: >Audit-Trail: >Unformatted: