aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-01-16 14:33:52 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-01-16 14:33:52 -0500
commit36e7a96ceb6e9d347d8bf3def689c315131edf10 (patch)
treedffdeb701446001443a2cffaec1a777dd7789fbe
parentce0f706e418dbd65f59b340486869f81de757751 (diff)
parent6f54c361329dbb67dac9de174e938992651d12d7 (diff)
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
-rw-r--r--arch/arm/boot/dts/at91sam9260.dtsi18
-rw-r--r--arch/arm/boot/dts/at91sam9263.dtsi36
-rw-r--r--arch/arm/boot/dts/at91sam9g45.dtsi36
-rw-r--r--arch/arm/boot/dts/at91sam9n12.dtsi26
-rw-r--r--arch/arm/boot/dts/at91sam9x5.dtsi32
-rw-r--r--drivers/misc/atmel-ssc.c8
-rw-r--r--sound/pci/hda/patch_hdmi.c2
-rw-r--r--sound/usb/mixer_maps.c13
-rw-r--r--sound/usb/quirks-table.h4
-rw-r--r--sound/usb/quirks.c19
10 files changed, 181 insertions, 13 deletions
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
index 68bccf41a2c6..cb7bcc51608d 100644
--- a/arch/arm/boot/dts/at91sam9260.dtsi
+++ b/arch/arm/boot/dts/at91sam9260.dtsi
@@ -306,6 +306,22 @@
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 pioA: gpio@fffff400 { 325 pioA: gpio@fffff400 {
310 compatible = "atmel,at91rm9200-gpio"; 326 compatible = "atmel,at91rm9200-gpio";
311 reg = <0xfffff400 0x200>; 327 reg = <0xfffff400 0x200>;
@@ -450,6 +466,8 @@
450 compatible = "atmel,at91rm9200-ssc"; 466 compatible = "atmel,at91rm9200-ssc";
451 reg = <0xfffbc000 0x4000>; 467 reg = <0xfffbc000 0x4000>;
452 interrupts = <14 4 5>; 468 interrupts = <14 4 5>;
469 pinctrl-names = "default";
470 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
453 status = "disabled"; 471 status = "disabled";
454 }; 472 };
455 473
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi
index 32ec62cf5385..271d4de026e9 100644
--- a/arch/arm/boot/dts/at91sam9263.dtsi
+++ b/arch/arm/boot/dts/at91sam9263.dtsi
@@ -271,6 +271,38 @@
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 pioA: gpio@fffff200 { 306 pioA: gpio@fffff200 {
275 compatible = "atmel,at91rm9200-gpio"; 307 compatible = "atmel,at91rm9200-gpio";
276 reg = <0xfffff200 0x200>; 308 reg = <0xfffff200 0x200>;
@@ -368,6 +400,8 @@
368 compatible = "atmel,at91rm9200-ssc"; 400 compatible = "atmel,at91rm9200-ssc";
369 reg = <0xfff98000 0x4000>; 401 reg = <0xfff98000 0x4000>;
370 interrupts = <16 4 5>; 402 interrupts = <16 4 5>;
403 pinctrl-names = "default";
404 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
371 status = "disabled"; 405 status = "disabled";
372 }; 406 };
373 407
@@ -375,6 +409,8 @@
375 compatible = "atmel,at91rm9200-ssc"; 409 compatible = "atmel,at91rm9200-ssc";
376 reg = <0xfff9c000 0x4000>; 410 reg = <0xfff9c000 0x4000>;
377 interrupts = <17 4 5>; 411 interrupts = <17 4 5>;
412 pinctrl-names = "default";
413 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
378 status = "disabled"; 414 status = "disabled";
379 }; 415 };
380 416
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index 231858ffd850..6b1d4cab24c2 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -290,6 +290,38 @@
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 pioA: gpio@fffff200 { 325 pioA: gpio@fffff200 {
294 compatible = "atmel,at91rm9200-gpio"; 326 compatible = "atmel,at91rm9200-gpio";
295 reg = <0xfffff200 0x200>; 327 reg = <0xfffff200 0x200>;
@@ -425,6 +457,8 @@
425 compatible = "atmel,at91sam9g45-ssc"; 457 compatible = "atmel,at91sam9g45-ssc";
426 reg = <0xfff9c000 0x4000>; 458 reg = <0xfff9c000 0x4000>;
427 interrupts = <16 4 5>; 459 interrupts = <16 4 5>;
460 pinctrl-names = "default";
461 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
428 status = "disabled"; 462 status = "disabled";
429 }; 463 };
430 464
@@ -432,6 +466,8 @@
432 compatible = "atmel,at91sam9g45-ssc"; 466 compatible = "atmel,at91sam9g45-ssc";
433 reg = <0xfffa0000 0x4000>; 467 reg = <0xfffa0000 0x4000>;
434 interrupts = <17 4 5>; 468 interrupts = <17 4 5>;
469 pinctrl-names = "default";
470 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
435 status = "disabled"; 471 status = "disabled";
436 }; 472 };
437 473
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi
index e9efb34f4379..80e29c605d4e 100644
--- a/arch/arm/boot/dts/at91sam9n12.dtsi
+++ b/arch/arm/boot/dts/at91sam9n12.dtsi
@@ -28,6 +28,7 @@
28 tcb1 = &tcb1; 28 tcb1 = &tcb1;
29 i2c0 = &i2c0; 29 i2c0 = &i2c0;
30 i2c1 = &i2c1; 30 i2c1 = &i2c1;
31 ssc0 = &ssc0;
31 }; 32 };
32 cpus { 33 cpus {
33 cpu@0 { 34 cpu@0 {
@@ -244,6 +245,22 @@
244 }; 245 };
245 }; 246 };
246 247
248 ssc0 {
249 pinctrl_ssc0_tx: ssc0_tx-0 {
250 atmel,pins =
251 <0 24 0x2 0x0 /* PA24 periph B */
252 0 25 0x2 0x0 /* PA25 periph B */
253 0 26 0x2 0x0>; /* PA26 periph B */
254 };
255
256 pinctrl_ssc0_rx: ssc0_rx-0 {
257 atmel,pins =
258 <0 27 0x2 0x0 /* PA27 periph B */
259 0 28 0x2 0x0 /* PA28 periph B */
260 0 29 0x2 0x0>; /* PA29 periph B */
261 };
262 };
263
247 pioA: gpio@fffff400 { 264 pioA: gpio@fffff400 {
248 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 265 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
249 reg = <0xfffff400 0x200>; 266 reg = <0xfffff400 0x200>;
@@ -294,6 +311,15 @@
294 status = "disabled"; 311 status = "disabled";
295 }; 312 };
296 313
314 ssc0: ssc@f0010000 {
315 compatible = "atmel,at91sam9g45-ssc";
316 reg = <0xf0010000 0x4000>;
317 interrupts = <28 4 5>;
318 pinctrl-names = "default";
319 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
320 status = "disabled";
321 };
322
297 usart0: serial@f801c000 { 323 usart0: serial@f801c000 {
298 compatible = "atmel,at91sam9260-usart"; 324 compatible = "atmel,at91sam9260-usart";
299 reg = <0xf801c000 0x4000>; 325 reg = <0xf801c000 0x4000>;
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index 40ac3a4eb1ab..3a47cf952146 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -88,13 +88,6 @@
88 interrupts = <1 4 7>; 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 tcb0: timer@f8008000 { 91 tcb0: timer@f8008000 {
99 compatible = "atmel,at91sam9x5-tcb"; 92 compatible = "atmel,at91sam9x5-tcb";
100 reg = <0xf8008000 0x100>; 93 reg = <0xf8008000 0x100>;
@@ -290,6 +283,22 @@
290 }; 283 };
291 }; 284 };
292 285
286 ssc0 {
287 pinctrl_ssc0_tx: ssc0_tx-0 {
288 atmel,pins =
289 <0 24 0x2 0x0 /* PA24 periph B */
290 0 25 0x2 0x0 /* PA25 periph B */
291 0 26 0x2 0x0>; /* PA26 periph B */
292 };
293
294 pinctrl_ssc0_rx: ssc0_rx-0 {
295 atmel,pins =
296 <0 27 0x2 0x0 /* PA27 periph B */
297 0 28 0x2 0x0 /* PA28 periph B */
298 0 29 0x2 0x0>; /* PA29 periph B */
299 };
300 };
301
293 pioA: gpio@fffff400 { 302 pioA: gpio@fffff400 {
294 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 303 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
295 reg = <0xfffff400 0x200>; 304 reg = <0xfffff400 0x200>;
@@ -333,6 +342,15 @@
333 }; 342 };
334 }; 343 };
335 344
345 ssc0: ssc@f0010000 {
346 compatible = "atmel,at91sam9g45-ssc";
347 reg = <0xf0010000 0x4000>;
348 interrupts = <28 4 5>;
349 pinctrl-names = "default";
350 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
351 status = "disabled";
352 };
353
336 mmc0: mmc@f0008000 { 354 mmc0: mmc@f0008000 {
337 compatible = "atmel,hsmci"; 355 compatible = "atmel,hsmci";
338 reg = <0xf0008000 0x600>; 356 reg = <0xf0008000 0x600>;
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
index 158da5a81a66..3c09cbb70b1d 100644
--- a/drivers/misc/atmel-ssc.c
+++ b/drivers/misc/atmel-ssc.c
@@ -19,6 +19,7 @@
19#include <linux/module.h> 19#include <linux/module.h>
20 20
21#include <linux/of.h> 21#include <linux/of.h>
22#include <linux/pinctrl/consumer.h>
22 23
23/* Serialize access to ssc_list and user count */ 24/* Serialize access to ssc_list and user count */
24static DEFINE_SPINLOCK(user_lock); 25static DEFINE_SPINLOCK(user_lock);
@@ -131,6 +132,13 @@ static int ssc_probe(struct platform_device *pdev)
131 struct resource *regs; 132 struct resource *regs;
132 struct ssc_device *ssc; 133 struct ssc_device *ssc;
133 const struct atmel_ssc_platform_data *plat_dat; 134 const struct atmel_ssc_platform_data *plat_dat;
135 struct pinctrl *pinctrl;
136
137 pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
138 if (IS_ERR(pinctrl)) {
139 dev_err(&pdev->dev, "Failed to request pinctrl\n");
140 return PTR_ERR(pinctrl);
141 }
134 142
135 ssc = devm_kzalloc(&pdev->dev, sizeof(struct ssc_device), GFP_KERNEL); 143 ssc = devm_kzalloc(&pdev->dev, sizeof(struct ssc_device), GFP_KERNEL);
136 if (!ssc) { 144 if (!ssc) {
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index b6c21ea187ca..807a2aa1ff38 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1502,7 +1502,7 @@ static int hdmi_chmap_ctl_put(struct snd_kcontrol *kcontrol,
1502 ctl_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); 1502 ctl_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
1503 substream = snd_pcm_chmap_substream(info, ctl_idx); 1503 substream = snd_pcm_chmap_substream(info, ctl_idx);
1504 if (!substream || !substream->runtime) 1504 if (!substream || !substream->runtime)
1505 return -EBADFD; 1505 return 0; /* just for avoiding error from alsactl restore */
1506 switch (substream->runtime->status->state) { 1506 switch (substream->runtime->status->state) {
1507 case SNDRV_PCM_STATE_OPEN: 1507 case SNDRV_PCM_STATE_OPEN:
1508 case SNDRV_PCM_STATE_SETUP: 1508 case SNDRV_PCM_STATE_SETUP:
diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c
index e71fe55cebef..0e2ed3d05c45 100644
--- a/sound/usb/mixer_maps.c
+++ b/sound/usb/mixer_maps.c
@@ -179,6 +179,15 @@ static struct usbmix_name_map audigy2nx_map[] = {
179 { 0 } /* terminator */ 179 { 0 } /* terminator */
180}; 180};
181 181
182static 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
182static struct usbmix_selector_map audigy2nx_selectors[] = { 191static struct usbmix_selector_map audigy2nx_selectors[] = {
183 { 192 {
184 .id = 14, /* Capture Source */ 193 .id = 14, /* Capture Source */
@@ -367,6 +376,10 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = {
367 .map = hercules_usb51_map, 376 .map = hercules_usb51_map,
368 }, 377 },
369 { 378 {
379 .id = USB_ID(0x0763, 0x2030),
380 .selector_map = c400_selectors,
381 },
382 {
370 .id = USB_ID(0x08bb, 0x2702), 383 .id = USB_ID(0x08bb, 0x2702),
371 .map = linex_map, 384 .map = linex_map,
372 .ignore_ctl_error = 1, 385 .ignore_ctl_error = 1,
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 78e845ec65da..64d25a7a4d59 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -2289,7 +2289,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
2289 .rate_table = (unsigned int[]) { 2289 .rate_table = (unsigned int[]) {
2290 44100, 48000, 88200, 96000 2290 44100, 48000, 88200, 96000
2291 }, 2291 },
2292 .clock = 0x81, 2292 .clock = 0x80,
2293 } 2293 }
2294 }, 2294 },
2295 /* Capture */ 2295 /* Capture */
@@ -2315,7 +2315,7 @@ YAMAHA_DEVICE(0x7010, "UB99"),
2315 .rate_table = (unsigned int[]) { 2315 .rate_table = (unsigned int[]) {
2316 44100, 48000, 88200, 96000 2316 44100, 48000, 88200, 96000
2317 }, 2317 },
2318 .clock = 0x81, 2318 .clock = 0x80,
2319 } 2319 }
2320 }, 2320 },
2321 /* MIDI */ 2321 /* MIDI */
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index acc12f004c23..2c971858d6b7 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -387,11 +387,13 @@ static int snd_usb_fasttrackpro_boot_quirk(struct usb_device *dev)
387 * rules 387 * rules
388 */ 388 */
389 err = usb_driver_set_configuration(dev, 2); 389 err = usb_driver_set_configuration(dev, 2);
390 if (err < 0) { 390 if (err < 0)
391 snd_printdd("error usb_driver_set_configuration: %d\n", 391 snd_printdd("error usb_driver_set_configuration: %d\n",
392 err); 392 err);
393 return -ENODEV; 393 /* Always return an error, so that we stop creating a device
394 } 394 that will just be destroyed and recreated with a new
395 configuration */
396 return -ENODEV;
395 } else 397 } else
396 snd_printk(KERN_INFO "usb-audio: Fast Track Pro config OK\n"); 398 snd_printk(KERN_INFO "usb-audio: Fast Track Pro config OK\n");
397 399
@@ -859,6 +861,17 @@ void snd_usb_endpoint_start_quirk(struct snd_usb_endpoint *ep)
859 if ((le16_to_cpu(ep->chip->dev->descriptor.idVendor) == 0x23ba) && 861 if ((le16_to_cpu(ep->chip->dev->descriptor.idVendor) == 0x23ba) &&
860 ep->type == SND_USB_ENDPOINT_TYPE_SYNC) 862 ep->type == SND_USB_ENDPOINT_TYPE_SYNC)
861 ep->skip_packets = 4; 863 ep->skip_packets = 4;
864
865 /*
866 * M-Audio Fast Track C400 - when packets are not skipped, real world
867 * latency varies by approx. +/- 50 frames (at 96KHz) each time the
868 * stream is (re)started. When skipping packets 16 at endpoint start
869 * up, the real world latency is stable within +/- 1 frame (also
870 * across power cycles).
871 */
872 if (ep->chip->usb_id == USB_ID(0x0763, 0x2030) &&
873 ep->type == SND_USB_ENDPOINT_TYPE_DATA)
874 ep->skip_packets = 16;
862} 875}
863 876
864void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe, 877void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,