Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull second round of sound fixes from Takashi Iwai:
"Yet a few more fixes popped up in this week.

The biggest change here is the addition of pinctrl support for Atmel,
which turned out to be almost mandatory to make things working.

The rest are a few fixes for M-Audio usb-audio device and a fix for
regression of HD-audio HDMI codecs with alsactl in the recent kernel."

* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda/hdmi - Work around "alsactl restore" errors
ALSA: usb-audio: selector map for M-Audio FT C400
ALSA: usb-audio: M-Audio FT C400 skip packet quirk
ALSA: usb-audio: correct M-Audio C400 clock source quirk
ALSA: usb - fix race in creation of M-Audio Fast track pro driver
ASoC: atmel-ssc: add pinctrl selection to driver
ARM: at91/dts: add pinctrl support for SSC peripheral

+181 -13
+18
arch/arm/boot/dts/at91sam9260.dtsi
··· 306 306 }; 307 307 }; 308 308 309 + ssc0 { 310 + pinctrl_ssc0_tx: ssc0_tx-0 { 311 + atmel,pins = 312 + <1 16 0x1 0x0 /* PB16 periph A */ 313 + 1 17 0x1 0x0 /* PB17 periph A */ 314 + 1 18 0x1 0x0>; /* PB18 periph A */ 315 + }; 316 + 317 + pinctrl_ssc0_rx: ssc0_rx-0 { 318 + atmel,pins = 319 + <1 19 0x1 0x0 /* PB19 periph A */ 320 + 1 20 0x1 0x0 /* PB20 periph A */ 321 + 1 21 0x1 0x0>; /* PB21 periph A */ 322 + }; 323 + }; 324 + 309 325 pioA: gpio@fffff400 { 310 326 compatible = "atmel,at91rm9200-gpio"; 311 327 reg = <0xfffff400 0x200>; ··· 466 450 compatible = "atmel,at91rm9200-ssc"; 467 451 reg = <0xfffbc000 0x4000>; 468 452 interrupts = <14 4 5>; 453 + pinctrl-names = "default"; 454 + pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 469 455 status = "disabled"; 470 456 }; 471 457
+36
arch/arm/boot/dts/at91sam9263.dtsi
··· 271 271 }; 272 272 }; 273 273 274 + ssc0 { 275 + pinctrl_ssc0_tx: ssc0_tx-0 { 276 + atmel,pins = 277 + <1 0 0x2 0x0 /* PB0 periph B */ 278 + 1 1 0x2 0x0 /* PB1 periph B */ 279 + 1 2 0x2 0x0>; /* PB2 periph B */ 280 + }; 281 + 282 + pinctrl_ssc0_rx: ssc0_rx-0 { 283 + atmel,pins = 284 + <1 3 0x2 0x0 /* PB3 periph B */ 285 + 1 4 0x2 0x0 /* PB4 periph B */ 286 + 1 5 0x2 0x0>; /* PB5 periph B */ 287 + }; 288 + }; 289 + 290 + ssc1 { 291 + pinctrl_ssc1_tx: ssc1_tx-0 { 292 + atmel,pins = 293 + <1 6 0x1 0x0 /* PB6 periph A */ 294 + 1 7 0x1 0x0 /* PB7 periph A */ 295 + 1 8 0x1 0x0>; /* PB8 periph A */ 296 + }; 297 + 298 + pinctrl_ssc1_rx: ssc1_rx-0 { 299 + atmel,pins = 300 + <1 9 0x1 0x0 /* PB9 periph A */ 301 + 1 10 0x1 0x0 /* PB10 periph A */ 302 + 1 11 0x1 0x0>; /* PB11 periph A */ 303 + }; 304 + }; 305 + 274 306 pioA: gpio@fffff200 { 275 307 compatible = "atmel,at91rm9200-gpio"; 276 308 reg = <0xfffff200 0x200>; ··· 400 368 compatible = "atmel,at91rm9200-ssc"; 401 369 reg = <0xfff98000 0x4000>; 402 370 interrupts = <16 4 5>; 371 + pinctrl-names = "default"; 372 + pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 403 373 status = "disabled"; 404 374 }; 405 375 ··· 409 375 compatible = "atmel,at91rm9200-ssc"; 410 376 reg = <0xfff9c000 0x4000>; 411 377 interrupts = <17 4 5>; 378 + pinctrl-names = "default"; 379 + pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>; 412 380 status = "disabled"; 413 381 }; 414 382
+36
arch/arm/boot/dts/at91sam9g45.dtsi
··· 290 290 }; 291 291 }; 292 292 293 + ssc0 { 294 + pinctrl_ssc0_tx: ssc0_tx-0 { 295 + atmel,pins = 296 + <3 0 0x1 0x0 /* PD0 periph A */ 297 + 3 1 0x1 0x0 /* PD1 periph A */ 298 + 3 2 0x1 0x0>; /* PD2 periph A */ 299 + }; 300 + 301 + pinctrl_ssc0_rx: ssc0_rx-0 { 302 + atmel,pins = 303 + <3 3 0x1 0x0 /* PD3 periph A */ 304 + 3 4 0x1 0x0 /* PD4 periph A */ 305 + 3 5 0x1 0x0>; /* PD5 periph A */ 306 + }; 307 + }; 308 + 309 + ssc1 { 310 + pinctrl_ssc1_tx: ssc1_tx-0 { 311 + atmel,pins = 312 + <3 10 0x1 0x0 /* PD10 periph A */ 313 + 3 11 0x1 0x0 /* PD11 periph A */ 314 + 3 12 0x1 0x0>; /* PD12 periph A */ 315 + }; 316 + 317 + pinctrl_ssc1_rx: ssc1_rx-0 { 318 + atmel,pins = 319 + <3 13 0x1 0x0 /* PD13 periph A */ 320 + 3 14 0x1 0x0 /* PD14 periph A */ 321 + 3 15 0x1 0x0>; /* PD15 periph A */ 322 + }; 323 + }; 324 + 293 325 pioA: gpio@fffff200 { 294 326 compatible = "atmel,at91rm9200-gpio"; 295 327 reg = <0xfffff200 0x200>; ··· 457 425 compatible = "atmel,at91sam9g45-ssc"; 458 426 reg = <0xfff9c000 0x4000>; 459 427 interrupts = <16 4 5>; 428 + pinctrl-names = "default"; 429 + pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 460 430 status = "disabled"; 461 431 }; 462 432 ··· 466 432 compatible = "atmel,at91sam9g45-ssc"; 467 433 reg = <0xfffa0000 0x4000>; 468 434 interrupts = <17 4 5>; 435 + pinctrl-names = "default"; 436 + pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>; 469 437 status = "disabled"; 470 438 }; 471 439
+26
arch/arm/boot/dts/at91sam9n12.dtsi
··· 28 28 tcb1 = &tcb1; 29 29 i2c0 = &i2c0; 30 30 i2c1 = &i2c1; 31 + ssc0 = &ssc0; 31 32 }; 32 33 cpus { 33 34 cpu@0 { ··· 245 244 }; 246 245 }; 247 246 247 + ssc0 { 248 + pinctrl_ssc0_tx: ssc0_tx-0 { 249 + atmel,pins = 250 + <0 24 0x2 0x0 /* PA24 periph B */ 251 + 0 25 0x2 0x0 /* PA25 periph B */ 252 + 0 26 0x2 0x0>; /* PA26 periph B */ 253 + }; 254 + 255 + pinctrl_ssc0_rx: ssc0_rx-0 { 256 + atmel,pins = 257 + <0 27 0x2 0x0 /* PA27 periph B */ 258 + 0 28 0x2 0x0 /* PA28 periph B */ 259 + 0 29 0x2 0x0>; /* PA29 periph B */ 260 + }; 261 + }; 262 + 248 263 pioA: gpio@fffff400 { 249 264 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 250 265 reg = <0xfffff400 0x200>; ··· 308 291 interrupts = <1 4 7>; 309 292 pinctrl-names = "default"; 310 293 pinctrl-0 = <&pinctrl_dbgu>; 294 + status = "disabled"; 295 + }; 296 + 297 + ssc0: ssc@f0010000 { 298 + compatible = "atmel,at91sam9g45-ssc"; 299 + reg = <0xf0010000 0x4000>; 300 + interrupts = <28 4 5>; 301 + pinctrl-names = "default"; 302 + pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 311 303 status = "disabled"; 312 304 }; 313 305
+25 -7
arch/arm/boot/dts/at91sam9x5.dtsi
··· 88 88 interrupts = <1 4 7>; 89 89 }; 90 90 91 - ssc0: ssc@f0010000 { 92 - compatible = "atmel,at91sam9g45-ssc"; 93 - reg = <0xf0010000 0x4000>; 94 - interrupts = <28 4 5>; 95 - status = "disabled"; 96 - }; 97 - 98 91 tcb0: timer@f8008000 { 99 92 compatible = "atmel,at91sam9x5-tcb"; 100 93 reg = <0xf8008000 0x100>; ··· 283 290 }; 284 291 }; 285 292 293 + ssc0 { 294 + pinctrl_ssc0_tx: ssc0_tx-0 { 295 + atmel,pins = 296 + <0 24 0x2 0x0 /* PA24 periph B */ 297 + 0 25 0x2 0x0 /* PA25 periph B */ 298 + 0 26 0x2 0x0>; /* PA26 periph B */ 299 + }; 300 + 301 + pinctrl_ssc0_rx: ssc0_rx-0 { 302 + atmel,pins = 303 + <0 27 0x2 0x0 /* PA27 periph B */ 304 + 0 28 0x2 0x0 /* PA28 periph B */ 305 + 0 29 0x2 0x0>; /* PA29 periph B */ 306 + }; 307 + }; 308 + 286 309 pioA: gpio@fffff400 { 287 310 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 288 311 reg = <0xfffff400 0x200>; ··· 340 331 interrupt-controller; 341 332 #interrupt-cells = <2>; 342 333 }; 334 + }; 335 + 336 + ssc0: ssc@f0010000 { 337 + compatible = "atmel,at91sam9g45-ssc"; 338 + reg = <0xf0010000 0x4000>; 339 + interrupts = <28 4 5>; 340 + pinctrl-names = "default"; 341 + pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>; 342 + status = "disabled"; 343 343 }; 344 344 345 345 mmc0: mmc@f0008000 {
+8
drivers/misc/atmel-ssc.c
··· 19 19 #include <linux/module.h> 20 20 21 21 #include <linux/of.h> 22 + #include <linux/pinctrl/consumer.h> 22 23 23 24 /* Serialize access to ssc_list and user count */ 24 25 static DEFINE_SPINLOCK(user_lock); ··· 132 131 struct resource *regs; 133 132 struct ssc_device *ssc; 134 133 const struct atmel_ssc_platform_data *plat_dat; 134 + struct pinctrl *pinctrl; 135 + 136 + pinctrl = devm_pinctrl_get_select_default(&pdev->dev); 137 + if (IS_ERR(pinctrl)) { 138 + dev_err(&pdev->dev, "Failed to request pinctrl\n"); 139 + return PTR_ERR(pinctrl); 140 + } 135 141 136 142 ssc = devm_kzalloc(&pdev->dev, sizeof(struct ssc_device), GFP_KERNEL); 137 143 if (!ssc) {
+1 -1
sound/pci/hda/patch_hdmi.c
··· 1502 1502 ctl_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 1503 1503 substream = snd_pcm_chmap_substream(info, ctl_idx); 1504 1504 if (!substream || !substream->runtime) 1505 - return -EBADFD; 1505 + return 0; /* just for avoiding error from alsactl restore */ 1506 1506 switch (substream->runtime->status->state) { 1507 1507 case SNDRV_PCM_STATE_OPEN: 1508 1508 case SNDRV_PCM_STATE_SETUP:
+13
sound/usb/mixer_maps.c
··· 179 179 { 0 } /* terminator */ 180 180 }; 181 181 182 + static struct usbmix_selector_map c400_selectors[] = { 183 + { 184 + .id = 0x80, 185 + .count = 2, 186 + .names = (const char*[]) {"Internal", "SPDIF"} 187 + }, 188 + { 0 } /* terminator */ 189 + }; 190 + 182 191 static struct usbmix_selector_map audigy2nx_selectors[] = { 183 192 { 184 193 .id = 14, /* Capture Source */ ··· 374 365 */ 375 366 .id = USB_ID(0x06f8, 0xc000), 376 367 .map = hercules_usb51_map, 368 + }, 369 + { 370 + .id = USB_ID(0x0763, 0x2030), 371 + .selector_map = c400_selectors, 377 372 }, 378 373 { 379 374 .id = USB_ID(0x08bb, 0x2702),
+2 -2
sound/usb/quirks-table.h
··· 2289 2289 .rate_table = (unsigned int[]) { 2290 2290 44100, 48000, 88200, 96000 2291 2291 }, 2292 - .clock = 0x81, 2292 + .clock = 0x80, 2293 2293 } 2294 2294 }, 2295 2295 /* Capture */ ··· 2315 2315 .rate_table = (unsigned int[]) { 2316 2316 44100, 48000, 88200, 96000 2317 2317 }, 2318 - .clock = 0x81, 2318 + .clock = 0x80, 2319 2319 } 2320 2320 }, 2321 2321 /* MIDI */
+16 -3
sound/usb/quirks.c
··· 387 387 * rules 388 388 */ 389 389 err = usb_driver_set_configuration(dev, 2); 390 - if (err < 0) { 390 + if (err < 0) 391 391 snd_printdd("error usb_driver_set_configuration: %d\n", 392 392 err); 393 - return -ENODEV; 394 - } 393 + /* Always return an error, so that we stop creating a device 394 + that will just be destroyed and recreated with a new 395 + configuration */ 396 + return -ENODEV; 395 397 } else 396 398 snd_printk(KERN_INFO "usb-audio: Fast Track Pro config OK\n"); 397 399 ··· 861 859 if ((le16_to_cpu(ep->chip->dev->descriptor.idVendor) == 0x23ba) && 862 860 ep->type == SND_USB_ENDPOINT_TYPE_SYNC) 863 861 ep->skip_packets = 4; 862 + 863 + /* 864 + * M-Audio Fast Track C400 - when packets are not skipped, real world 865 + * latency varies by approx. +/- 50 frames (at 96KHz) each time the 866 + * stream is (re)started. When skipping packets 16 at endpoint start 867 + * up, the real world latency is stable within +/- 1 frame (also 868 + * across power cycles). 869 + */ 870 + if (ep->chip->usb_id == USB_ID(0x0763, 0x2030) && 871 + ep->type == SND_USB_ENDPOINT_TYPE_DATA) 872 + ep->skip_packets = 16; 864 873 } 865 874 866 875 void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,