Bug 123640

Summary: [patch] [snd_cmi] add support of "C-Media INC. USB Sound Device" a.k.a. CMI120
Product: Base System Reporter: Juan José del Río <juanjose>
Component: kernAssignee: Ariff Abdullah <ariff>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 7.0-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Juan José del Río 2008-05-13 21:00:13 UTC
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

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:
How-To-Repeat: Plug in the speakers in a system using 7.0-RELEASE
Comment 1 Ariff Abdullah freebsd_committer freebsd_triage 2008-05-15 13:09:59 UTC
Responsible Changed
From-To: freebsd-bugs->ariff

I'm taking care of this.
Comment 2 dfilter service freebsd_committer freebsd_triage 2009-01-18 04:29:53 UTC
Author: keramida (doc committer)
Date: Sun Jan 18 04:29:42 2009
New Revision: 187375
URL: http://svn.freebsd.org/changeset/base/187375

Log:
  Add support for CMedia CMI120.
  
  PR:		kern/123640
  Approved by:	ariff
  MFC after:	2 weeks

Modified:
  head/sys/dev/sound/pci/cmi.c

Modified: head/sys/dev/sound/pci/cmi.c
==============================================================================
--- head/sys/dev/sound/pci/cmi.c	Sat Jan 17 23:01:40 2009	(r187374)
+++ head/sys/dev/sound/pci/cmi.c	Sun Jan 18 04:29:42 2009	(r187375)
@@ -60,6 +60,7 @@ SND_DECLARE_FILE("$FreeBSD$");
 #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 @@ cmi_probe(device_t dev)
 	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;
 	}
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 3 Giorgos Keramidas freebsd_committer freebsd_triage 2009-01-18 04:29:58 UTC
State Changed
From-To: open->patched

I have committed the patch, after a request by Ariff. 
We will merge the patch to the stable branches after 
it settles for a couple of weeks into CURRENT, or even 
earlier if Ariff approves the MFC.
Comment 4 dfilter service freebsd_committer freebsd_triage 2009-02-02 04:48:52 UTC
Author: keramida (doc committer)
Date: Mon Feb  2 04:48:32 2009
New Revision: 187997
URL: http://svn.freebsd.org/changeset/base/187997

Log:
  MFC 187375 from /head
  
  Add support for CMedia CMI120.
  
  PR:           kern/123640
  Approved by:  ariff

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/sound/pci/cmi.c

Modified: stable/7/sys/dev/sound/pci/cmi.c
==============================================================================
--- stable/7/sys/dev/sound/pci/cmi.c	Mon Feb  2 03:34:40 2009	(r187996)
+++ stable/7/sys/dev/sound/pci/cmi.c	Mon Feb  2 04:48:32 2009	(r187997)
@@ -60,6 +60,7 @@ SND_DECLARE_FILE("$FreeBSD$");
 #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 @@ cmi_probe(device_t dev)
 	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;
 	}
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 5 dfilter service freebsd_committer freebsd_triage 2009-02-02 04:53:49 UTC
Author: keramida (doc committer)
Date: Mon Feb  2 04:53:39 2009
New Revision: 187998
URL: http://svn.freebsd.org/changeset/base/187998

Log:
  MFC 187375 from /head
  
  Add support for CMedia CMI120.
  
  PR:           kern/123640
  Approved by:  ariff

Modified:
  stable/6/sys/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)
  stable/6/sys/dev/sound/pci/cmi.c

Modified: stable/6/sys/dev/sound/pci/cmi.c
==============================================================================
--- stable/6/sys/dev/sound/pci/cmi.c	Mon Feb  2 04:48:32 2009	(r187997)
+++ stable/6/sys/dev/sound/pci/cmi.c	Mon Feb  2 04:53:39 2009	(r187998)
@@ -58,6 +58,7 @@ SND_DECLARE_FILE("$FreeBSD$");
 #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
@@ -822,6 +823,9 @@ cmi_probe(device_t dev)
 	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;
 	}
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 6 Giorgos Keramidas freebsd_committer freebsd_triage 2009-02-02 04:54:02 UTC
State Changed
From-To: patched->closed

Merged to stable/7 [r187997] and stable/6 [r187998]. 

Thanks for the patch :-)