~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to sound/usb/clock.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-12-06 15:56:07 UTC
  • Revision ID: package-import@ubuntu.com-20111206155607-pcf44kv5fmhk564f
Tags: 3.2.0-1401.1
[ Paolo Pisati ]

* Rebased on top of Ubuntu-3.2.0-3.8
* Tilt-tracking @ ef2487af4bb15bdd0689631774b5a5e3a59f74e2
* Delete debian.ti-omap4/control, it shoudln't be tracked
* Fix architecture spelling (s/armel/armhf/)
* [Config] Update configs following 3.2 import
* [Config] Fix compilation: disable CODA and ARCH_OMAP3
* [Config] Fix compilation: disable Ethernet Faraday
* Update series to precise

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
                              USB_RECIP_INTERFACE | USB_TYPE_CLASS | USB_DIR_IN,
92
92
                              UAC2_CX_CLOCK_SELECTOR << 8,
93
93
                              snd_usb_ctrl_intf(chip) | (selector_id << 8),
94
 
                              &buf, sizeof(buf), 1000);
 
94
                              &buf, sizeof(buf));
95
95
 
96
96
        if (ret < 0)
97
97
                return ret;
118
118
                              USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN,
119
119
                              UAC2_CS_CONTROL_CLOCK_VALID << 8,
120
120
                              snd_usb_ctrl_intf(chip) | (source_id << 8),
121
 
                              &data, sizeof(data), 1000);
 
121
                              &data, sizeof(data));
122
122
 
123
123
        if (err < 0) {
124
124
                snd_printk(KERN_WARNING "%s(): cannot get clock validity for id %d\n",
222
222
        if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC_SET_CUR,
223
223
                                   USB_TYPE_CLASS | USB_RECIP_ENDPOINT | USB_DIR_OUT,
224
224
                                   UAC_EP_CS_ATTR_SAMPLE_RATE << 8, ep,
225
 
                                   data, sizeof(data), 1000)) < 0) {
 
225
                                   data, sizeof(data))) < 0) {
226
226
                snd_printk(KERN_ERR "%d:%d:%d: cannot set freq %d to ep %#x\n",
227
227
                           dev->devnum, iface, fmt->altsetting, rate, ep);
228
228
                return err;
231
231
        if ((err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC_GET_CUR,
232
232
                                   USB_TYPE_CLASS | USB_RECIP_ENDPOINT | USB_DIR_IN,
233
233
                                   UAC_EP_CS_ATTR_SAMPLE_RATE << 8, ep,
234
 
                                   data, sizeof(data), 1000)) < 0) {
 
234
                                   data, sizeof(data))) < 0) {
235
235
                snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq at ep %#x\n",
236
236
                           dev->devnum, iface, fmt->altsetting, ep);
237
237
                return 0; /* some devices don't support reading */
273
273
                                   USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_OUT,
274
274
                                   UAC2_CS_CONTROL_SAM_FREQ << 8,
275
275
                                   snd_usb_ctrl_intf(chip) | (clock << 8),
276
 
                                   data, sizeof(data), 1000)) < 0) {
 
276
                                   data, sizeof(data))) < 0) {
277
277
                snd_printk(KERN_ERR "%d:%d:%d: cannot set freq %d (v2)\n",
278
278
                           dev->devnum, iface, fmt->altsetting, rate);
279
279
                return err;
283
283
                                   USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN,
284
284
                                   UAC2_CS_CONTROL_SAM_FREQ << 8,
285
285
                                   snd_usb_ctrl_intf(chip) | (clock << 8),
286
 
                                   data, sizeof(data), 1000)) < 0) {
 
286
                                   data, sizeof(data))) < 0) {
287
287
                snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq (v2)\n",
288
288
                           dev->devnum, iface, fmt->altsetting);
289
289
                return err;