diff options
Diffstat (limited to 'sound/oss')
-rw-r--r-- | sound/oss/Kconfig | 30 | ||||
-rw-r--r-- | sound/oss/au1550_ac97.c | 1 | ||||
-rw-r--r-- | sound/oss/btaudio.c | 2 | ||||
-rw-r--r-- | sound/oss/dmasound/Kconfig | 14 | ||||
-rw-r--r-- | sound/oss/dmasound/dmasound_awacs.c | 137 | ||||
-rw-r--r-- | sound/oss/dmasound/tas_common.c | 9 | ||||
-rw-r--r-- | sound/oss/dmasound/tas_ioctl.h | 1 | ||||
-rw-r--r-- | sound/oss/es1371.c | 2 | ||||
-rw-r--r-- | sound/oss/pas2_pcm.c | 2 | ||||
-rw-r--r-- | sound/oss/sh_dac_audio.c | 2 | ||||
-rw-r--r-- | sound/oss/soundcard.c | 1 | ||||
-rw-r--r-- | sound/oss/swarm_cs4297a.c | 1 | ||||
-rw-r--r-- | sound/oss/trident.c | 5 | ||||
-rw-r--r-- | sound/oss/via82cxxx_audio.c | 1 |
14 files changed, 102 insertions, 106 deletions
diff --git a/sound/oss/Kconfig b/sound/oss/Kconfig index 4c41930030..4b30ae6d8b 100644 --- a/sound/oss/Kconfig +++ b/sound/oss/Kconfig | |||
@@ -5,23 +5,22 @@ | |||
5 | # | 5 | # |
6 | # Prompt user for primary drivers. | 6 | # Prompt user for primary drivers. |
7 | 7 | ||
8 | config OBSOLETE_OSS | 8 | config OSS_OBSOLETE |
9 | bool "Obsolete OSS drivers" | 9 | bool "Obsolete OSS drivers" |
10 | depends on SOUND_PRIME | 10 | depends on SOUND_PRIME |
11 | help | 11 | help |
12 | This option enables support for obsolete OSS drivers that | 12 | This option enables support for obsolete OSS drivers that |
13 | are scheduled for removal in the near future since there | 13 | are scheduled for removal in the near future. |
14 | are ALSA drivers for the same hardware. | ||
15 | 14 | ||
16 | Please contact Adrian Bunk <bunk@stusta.de> if you had to | 15 | Please contact Adrian Bunk <bunk@stusta.de> if you had to |
17 | say Y here because your soundcard is not properly supported | 16 | say Y here because your hardware is not properly supported |
18 | by ALSA. | 17 | by ALSA. |
19 | 18 | ||
20 | If unsure, say N. | 19 | If unsure, say N. |
21 | 20 | ||
22 | config SOUND_BT878 | 21 | config SOUND_BT878 |
23 | tristate "BT878 audio dma" | 22 | tristate "BT878 audio dma" |
24 | depends on SOUND_PRIME && PCI | 23 | depends on SOUND_PRIME && PCI && OSS_OBSOLETE |
25 | ---help--- | 24 | ---help--- |
26 | Audio DMA support for bt878 based grabber boards. As you might have | 25 | Audio DMA support for bt878 based grabber boards. As you might have |
27 | already noticed, bt878 is listed with two functions in /proc/pci. | 26 | already noticed, bt878 is listed with two functions in /proc/pci. |
@@ -45,22 +44,9 @@ config SOUND_BCM_CS4297A | |||
45 | note that CONFIG_KGDB should not be enabled at the same | 44 | note that CONFIG_KGDB should not be enabled at the same |
46 | time, since it also attempts to use this UART port. | 45 | time, since it also attempts to use this UART port. |
47 | 46 | ||
48 | config SOUND_ES1371 | ||
49 | tristate "Creative Ensoniq AudioPCI 97 (ES1371)" | ||
50 | depends on SOUND_PRIME && PCI && OBSOLETE_OSS | ||
51 | help | ||
52 | Say Y or M if you have a PCI sound card utilizing the Ensoniq | ||
53 | ES1371 chipset, such as Ensoniq's AudioPCI97. To find out if | ||
54 | your sound card uses an ES1371 without removing your computer's | ||
55 | cover, use lspci -n and look for the PCI ID 1274:1371. Since | ||
56 | Ensoniq was bought by Creative Labs, Sound Blaster 64/PCI | ||
57 | models are either ES1370 or ES1371 based. This driver differs | ||
58 | slightly from OSS/Free, so PLEASE READ | ||
59 | <file:Documentation/sound/oss/es1371>. | ||
60 | |||
61 | config SOUND_ICH | 47 | config SOUND_ICH |
62 | tristate "Intel ICH (i8xx) audio support" | 48 | tristate "Intel ICH (i8xx) audio support" |
63 | depends on SOUND_PRIME && PCI | 49 | depends on SOUND_PRIME && PCI && OSS_OBSOLETE |
64 | help | 50 | help |
65 | Support for integral audio in Intel's I/O Controller Hub (ICH) | 51 | Support for integral audio in Intel's I/O Controller Hub (ICH) |
66 | chipset, as used on the 810/820/840 motherboards. | 52 | chipset, as used on the 810/820/840 motherboards. |
@@ -362,7 +348,7 @@ config MSND_FIFOSIZE | |||
362 | 348 | ||
363 | config SOUND_VIA82CXXX | 349 | config SOUND_VIA82CXXX |
364 | tristate "VIA 82C686 Audio Codec" | 350 | tristate "VIA 82C686 Audio Codec" |
365 | depends on SOUND_PRIME && PCI | 351 | depends on SOUND_PRIME && PCI && OSS_OBSOLETE |
366 | help | 352 | help |
367 | Say Y here to include support for the audio codec found on VIA | 353 | Say Y here to include support for the audio codec found on VIA |
368 | 82Cxxx-based chips. Typically these are built into a motherboard. | 354 | 82Cxxx-based chips. Typically these are built into a motherboard. |
@@ -416,7 +402,7 @@ config SOUND_DMAP | |||
416 | 402 | ||
417 | config SOUND_CS4232 | 403 | config SOUND_CS4232 |
418 | tristate "Crystal CS4232 based (PnP) cards" | 404 | tristate "Crystal CS4232 based (PnP) cards" |
419 | depends on SOUND_OSS | 405 | depends on SOUND_OSS && OSS_OBSOLETE |
420 | help | 406 | help |
421 | Say Y here if you have a card based on the Crystal CS4232 chip set, | 407 | Say Y here if you have a card based on the Crystal CS4232 chip set, |
422 | which uses its own Plug and Play protocol. | 408 | which uses its own Plug and Play protocol. |
@@ -735,7 +721,7 @@ config SOUND_WAVEARTIST | |||
735 | 721 | ||
736 | config SOUND_TVMIXER | 722 | config SOUND_TVMIXER |
737 | tristate "TV card (bt848) mixer support" | 723 | tristate "TV card (bt848) mixer support" |
738 | depends on SOUND_PRIME && I2C && VIDEO_V4L1 | 724 | depends on SOUND_PRIME && I2C && VIDEO_V4L1 && OSS_OBSOLETE |
739 | help | 725 | help |
740 | Support for audio mixer facilities on the BT848 TV frame-grabber | 726 | Support for audio mixer facilities on the BT848 TV frame-grabber |
741 | card. | 727 | card. |
diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c index a339f0c0d5..23018a7c06 100644 --- a/sound/oss/au1550_ac97.c +++ b/sound/oss/au1550_ac97.c | |||
@@ -47,7 +47,6 @@ | |||
47 | #include <linux/interrupt.h> | 47 | #include <linux/interrupt.h> |
48 | #include <linux/kernel.h> | 48 | #include <linux/kernel.h> |
49 | #include <linux/poll.h> | 49 | #include <linux/poll.h> |
50 | #include <linux/pci.h> | ||
51 | #include <linux/bitops.h> | 50 | #include <linux/bitops.h> |
52 | #include <linux/spinlock.h> | 51 | #include <linux/spinlock.h> |
53 | #include <linux/smp_lock.h> | 52 | #include <linux/smp_lock.h> |
diff --git a/sound/oss/btaudio.c b/sound/oss/btaudio.c index f813ae9c21..4d5cf05b89 100644 --- a/sound/oss/btaudio.c +++ b/sound/oss/btaudio.c | |||
@@ -344,7 +344,7 @@ static int btaudio_mixer_ioctl(struct inode *inode, struct file *file, | |||
344 | if (cmd == SOUND_OLD_MIXER_INFO) { | 344 | if (cmd == SOUND_OLD_MIXER_INFO) { |
345 | _old_mixer_info info; | 345 | _old_mixer_info info; |
346 | memset(&info,0,sizeof(info)); | 346 | memset(&info,0,sizeof(info)); |
347 | strlcpy(info.id,"bt878",sizeof(info.id)-1); | 347 | strlcpy(info.id, "bt878", sizeof(info.id)); |
348 | strlcpy(info.name,"Brooktree Bt878 audio",sizeof(info.name)); | 348 | strlcpy(info.name,"Brooktree Bt878 audio",sizeof(info.name)); |
349 | if (copy_to_user(argp, &info, sizeof(info))) | 349 | if (copy_to_user(argp, &info, sizeof(info))) |
350 | return -EFAULT; | 350 | return -EFAULT; |
diff --git a/sound/oss/dmasound/Kconfig b/sound/oss/dmasound/Kconfig index 18e149f52a..71b313479f 100644 --- a/sound/oss/dmasound/Kconfig +++ b/sound/oss/dmasound/Kconfig | |||
@@ -12,20 +12,6 @@ config DMASOUND_ATARI | |||
12 | want). If you want to compile it as a module, say M here and read | 12 | want). If you want to compile it as a module, say M here and read |
13 | <file:Documentation/kbuild/modules.txt>. | 13 | <file:Documentation/kbuild/modules.txt>. |
14 | 14 | ||
15 | config DMASOUND_PMAC | ||
16 | tristate "PowerMac DMA sound support" | ||
17 | depends on PPC32 && PPC_PMAC && SOUND && I2C && OBSOLETE_OSS | ||
18 | select DMASOUND | ||
19 | help | ||
20 | If you want to use the internal audio of your PowerMac in Linux, | ||
21 | answer Y to this question. This will provide a Sun-like /dev/audio, | ||
22 | compatible with the Linux/i386 sound system. Otherwise, say N. | ||
23 | |||
24 | This driver is also available as a module ( = code which can be | ||
25 | inserted in and removed from the running kernel whenever you | ||
26 | want). If you want to compile it as a module, say M here and read | ||
27 | <file:Documentation/kbuild/modules.txt>. | ||
28 | |||
29 | config DMASOUND_PAULA | 15 | config DMASOUND_PAULA |
30 | tristate "Amiga DMA sound support" | 16 | tristate "Amiga DMA sound support" |
31 | depends on (AMIGA || APUS) && SOUND | 17 | depends on (AMIGA || APUS) && SOUND |
diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c index 37773b1dee..8f6388004f 100644 --- a/sound/oss/dmasound/dmasound_awacs.c +++ b/sound/oss/dmasound/dmasound_awacs.c | |||
@@ -257,7 +257,7 @@ static volatile struct dbdma_cmd *emergency_dbdma_cmd; | |||
257 | /* | 257 | /* |
258 | * Stuff for restoring after a sleep. | 258 | * Stuff for restoring after a sleep. |
259 | */ | 259 | */ |
260 | static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when); | 260 | static void awacs_sleep_notify(struct pmu_sleep_notifier *self, int when); |
261 | struct pmu_sleep_notifier awacs_sleep_notifier = { | 261 | struct pmu_sleep_notifier awacs_sleep_notifier = { |
262 | awacs_sleep_notify, SLEEP_LEVEL_SOUND, | 262 | awacs_sleep_notify, SLEEP_LEVEL_SOUND, |
263 | }; | 263 | }; |
@@ -346,36 +346,42 @@ int gpio_headphone_irq; | |||
346 | int | 346 | int |
347 | setup_audio_gpio(const char *name, const char* compatible, int *gpio_addr, int* gpio_pol) | 347 | setup_audio_gpio(const char *name, const char* compatible, int *gpio_addr, int* gpio_pol) |
348 | { | 348 | { |
349 | struct device_node *gpiop; | ||
349 | struct device_node *np; | 350 | struct device_node *np; |
350 | const u32* pp; | 351 | const u32* pp; |
352 | int ret = -ENODEV; | ||
351 | 353 | ||
352 | np = find_devices("gpio"); | 354 | gpiop = of_find_node_by_name(NULL, "gpio"); |
353 | if (!np) | 355 | if (!gpiop) |
354 | return -ENODEV; | 356 | goto done; |
355 | 357 | ||
356 | np = np->child; | 358 | np = of_get_next_child(gpiop, NULL); |
357 | while(np != 0) { | 359 | while(np != 0) { |
358 | if (name) { | 360 | if (name) { |
359 | const char *property = | 361 | const char *property = |
360 | get_property(np,"audio-gpio",NULL); | 362 | of_get_property(np,"audio-gpio",NULL); |
361 | if (property != 0 && strcmp(property,name) == 0) | 363 | if (property != 0 && strcmp(property,name) == 0) |
362 | break; | 364 | break; |
363 | } else if (compatible && device_is_compatible(np, compatible)) | 365 | } else if (compatible && of_device_is_compatible(np, compatible)) |
364 | break; | 366 | break; |
365 | np = np->sibling; | 367 | np = of_get_next_child(gpiop, np); |
366 | } | 368 | } |
367 | if (!np) | 369 | if (!np) |
368 | return -ENODEV; | 370 | goto done; |
369 | pp = get_property(np, "AAPL,address", NULL); | 371 | pp = of_get_property(np, "AAPL,address", NULL); |
370 | if (!pp) | 372 | if (!pp) |
371 | return -ENODEV; | 373 | goto done; |
372 | *gpio_addr = (*pp) & 0x0000ffff; | 374 | *gpio_addr = (*pp) & 0x0000ffff; |
373 | pp = get_property(np, "audio-gpio-active-state", NULL); | 375 | pp = of_get_property(np, "audio-gpio-active-state", NULL); |
374 | if (pp) | 376 | if (pp) |
375 | *gpio_pol = *pp; | 377 | *gpio_pol = *pp; |
376 | else | 378 | else |
377 | *gpio_pol = 1; | 379 | *gpio_pol = 1; |
378 | return irq_of_parse_and_map(np, 0); | 380 | ret = irq_of_parse_and_map(np, 0); |
381 | done: | ||
382 | of_node_put(np); | ||
383 | of_node_put(gpiop); | ||
384 | return ret; | ||
379 | } | 385 | } |
380 | 386 | ||
381 | static inline void | 387 | static inline void |
@@ -578,7 +584,7 @@ tas_mixer_ioctl(u_int cmd, u_long arg) | |||
578 | } | 584 | } |
579 | 585 | ||
580 | static void __init | 586 | static void __init |
581 | tas_init_frame_rates(unsigned int *prop, unsigned int l) | 587 | tas_init_frame_rates(const unsigned int *prop, unsigned int l) |
582 | { | 588 | { |
583 | int i ; | 589 | int i ; |
584 | if (prop) { | 590 | if (prop) { |
@@ -1419,7 +1425,7 @@ load_awacs(void) | |||
1419 | * Save state when going to sleep, restore it afterwards. | 1425 | * Save state when going to sleep, restore it afterwards. |
1420 | */ | 1426 | */ |
1421 | /* FIXME: sort out disabling/re-enabling of read stuff as well */ | 1427 | /* FIXME: sort out disabling/re-enabling of read stuff as well */ |
1422 | static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when) | 1428 | static void awacs_sleep_notify(struct pmu_sleep_notifier *self, int when) |
1423 | { | 1429 | { |
1424 | unsigned long flags; | 1430 | unsigned long flags; |
1425 | 1431 | ||
@@ -1548,7 +1554,6 @@ static int awacs_sleep_notify(struct pmu_sleep_notifier *self, int when) | |||
1548 | spin_unlock_irqrestore(&dmasound.lock, flags); | 1554 | spin_unlock_irqrestore(&dmasound.lock, flags); |
1549 | UNLOCK(); | 1555 | UNLOCK(); |
1550 | } | 1556 | } |
1551 | return PBOOK_SLEEP_OK; | ||
1552 | } | 1557 | } |
1553 | #endif /* CONFIG_PM */ | 1558 | #endif /* CONFIG_PM */ |
1554 | 1559 | ||
@@ -2553,32 +2558,33 @@ set_model(void) | |||
2553 | static struct device_node* __init | 2558 | static struct device_node* __init |
2554 | get_snd_io_node(void) | 2559 | get_snd_io_node(void) |
2555 | { | 2560 | { |
2556 | struct device_node *np = NULL; | 2561 | struct device_node *np; |
2557 | 2562 | ||
2558 | /* set up awacs_node for early OF which doesn't have a full set of | 2563 | /* set up awacs_node for early OF which doesn't have a full set of |
2559 | * properties on davbus | 2564 | * properties on davbus |
2560 | */ | 2565 | */ |
2561 | 2566 | awacs_node = of_find_node_by_name(NULL, "awacs"); | |
2562 | awacs_node = find_devices("awacs"); | ||
2563 | if (awacs_node) | 2567 | if (awacs_node) |
2564 | awacs_revision = AWACS_AWACS; | 2568 | awacs_revision = AWACS_AWACS; |
2565 | 2569 | ||
2566 | /* powermac models after 9500 (other than those which use DACA or | 2570 | /* powermac models after 9500 (other than those which use DACA or |
2567 | * Tumbler) have a node called "davbus". | 2571 | * Tumbler) have a node called "davbus". |
2568 | */ | 2572 | */ |
2569 | np = find_devices("davbus"); | 2573 | np = of_find_node_by_name(NULL, "davbus"); |
2570 | /* | 2574 | /* |
2571 | * if we didn't find a davbus device, try 'i2s-a' since | 2575 | * if we didn't find a davbus device, try 'i2s-a' since |
2572 | * this seems to be what iBooks (& Tumbler) have. | 2576 | * this seems to be what iBooks (& Tumbler) have. |
2573 | */ | 2577 | */ |
2574 | if (np == NULL) | 2578 | if (np == NULL) { |
2575 | np = i2s_node = find_devices("i2s-a"); | 2579 | i2s_node = of_find_node_by_name(NULL, "i2s-a"); |
2580 | np = of_node_get(i2s_node); | ||
2581 | } | ||
2576 | 2582 | ||
2577 | /* if we didn't find this - perhaps we are on an early model | 2583 | /* if we didn't find this - perhaps we are on an early model |
2578 | * which _only_ has an 'awacs' node | 2584 | * which _only_ has an 'awacs' node |
2579 | */ | 2585 | */ |
2580 | if (np == NULL && awacs_node) | 2586 | if (np == NULL && awacs_node) |
2581 | np = awacs_node ; | 2587 | np = of_node_get(awacs_node); |
2582 | 2588 | ||
2583 | /* if we failed all these return null - this will cause the | 2589 | /* if we failed all these return null - this will cause the |
2584 | * driver to give up... | 2590 | * driver to give up... |
@@ -2597,9 +2603,9 @@ get_snd_info_node(struct device_node *io) | |||
2597 | { | 2603 | { |
2598 | struct device_node *info; | 2604 | struct device_node *info; |
2599 | 2605 | ||
2600 | info = find_devices("sound"); | 2606 | for_each_node_by_name(info, "sound") |
2601 | while (info && info->parent != io) | 2607 | if (info->parent == io) |
2602 | info = info->next; | 2608 | break; |
2603 | return info; | 2609 | return info; |
2604 | } | 2610 | } |
2605 | 2611 | ||
@@ -2614,17 +2620,17 @@ get_codec_type(struct device_node *info) | |||
2614 | 2620 | ||
2615 | if (info) { | 2621 | if (info) { |
2616 | /* must do awacs first to allow screamer to overide it */ | 2622 | /* must do awacs first to allow screamer to overide it */ |
2617 | if (device_is_compatible(info, "awacs")) | 2623 | if (of_device_is_compatible(info, "awacs")) |
2618 | codec = AWACS_AWACS ; | 2624 | codec = AWACS_AWACS ; |
2619 | if (device_is_compatible(info, "screamer")) | 2625 | if (of_device_is_compatible(info, "screamer")) |
2620 | codec = AWACS_SCREAMER; | 2626 | codec = AWACS_SCREAMER; |
2621 | if (device_is_compatible(info, "burgundy")) | 2627 | if (of_device_is_compatible(info, "burgundy")) |
2622 | codec = AWACS_BURGUNDY ; | 2628 | codec = AWACS_BURGUNDY ; |
2623 | if (device_is_compatible(info, "daca")) | 2629 | if (of_device_is_compatible(info, "daca")) |
2624 | codec = AWACS_DACA; | 2630 | codec = AWACS_DACA; |
2625 | if (device_is_compatible(info, "tumbler")) | 2631 | if (of_device_is_compatible(info, "tumbler")) |
2626 | codec = AWACS_TUMBLER; | 2632 | codec = AWACS_TUMBLER; |
2627 | if (device_is_compatible(info, "snapper")) | 2633 | if (of_device_is_compatible(info, "snapper")) |
2628 | codec = AWACS_SNAPPER; | 2634 | codec = AWACS_SNAPPER; |
2629 | } | 2635 | } |
2630 | return codec ; | 2636 | return codec ; |
@@ -2635,11 +2641,17 @@ get_codec_type(struct device_node *info) | |||
2635 | static void __init | 2641 | static void __init |
2636 | get_expansion_type(void) | 2642 | get_expansion_type(void) |
2637 | { | 2643 | { |
2638 | if (find_devices("perch") != NULL) | 2644 | struct device_node *dn; |
2645 | |||
2646 | dn = of_find_node_by_name(NULL, "perch"); | ||
2647 | if (dn != NULL) | ||
2639 | has_perch = 1; | 2648 | has_perch = 1; |
2649 | of_node_put(dn); | ||
2640 | 2650 | ||
2641 | if (find_devices("pb-ziva-pc") != NULL) | 2651 | dn = of_find_node_by_name(NULL, "pb-ziva-pc"); |
2652 | if (dn != NULL) | ||
2642 | has_ziva = 1; | 2653 | has_ziva = 1; |
2654 | of_node_put(dn); | ||
2643 | /* need to work out how we deal with iMac SRS module */ | 2655 | /* need to work out how we deal with iMac SRS module */ |
2644 | } | 2656 | } |
2645 | 2657 | ||
@@ -2652,7 +2664,7 @@ get_expansion_type(void) | |||
2652 | */ | 2664 | */ |
2653 | 2665 | ||
2654 | static void __init | 2666 | static void __init |
2655 | awacs_init_frame_rates(unsigned int *prop, unsigned int l) | 2667 | awacs_init_frame_rates(const unsigned int *prop, unsigned int l) |
2656 | { | 2668 | { |
2657 | int i ; | 2669 | int i ; |
2658 | if (prop) { | 2670 | if (prop) { |
@@ -2675,7 +2687,7 @@ awacs_init_frame_rates(unsigned int *prop, unsigned int l) | |||
2675 | } | 2687 | } |
2676 | 2688 | ||
2677 | static void __init | 2689 | static void __init |
2678 | burgundy_init_frame_rates(unsigned int *prop, unsigned int l) | 2690 | burgundy_init_frame_rates(const unsigned int *prop, unsigned int l) |
2679 | { | 2691 | { |
2680 | int temp[9] ; | 2692 | int temp[9] ; |
2681 | int i = 0 ; | 2693 | int i = 0 ; |
@@ -2701,7 +2713,7 @@ if (i > 1){ | |||
2701 | } | 2713 | } |
2702 | 2714 | ||
2703 | static void __init | 2715 | static void __init |
2704 | daca_init_frame_rates(unsigned int *prop, unsigned int l) | 2716 | daca_init_frame_rates(const unsigned int *prop, unsigned int l) |
2705 | { | 2717 | { |
2706 | int temp[9] ; | 2718 | int temp[9] ; |
2707 | int i = 0 ; | 2719 | int i = 0 ; |
@@ -2728,7 +2740,7 @@ if (i > 1){ | |||
2728 | } | 2740 | } |
2729 | 2741 | ||
2730 | static void __init | 2742 | static void __init |
2731 | init_frame_rates(unsigned int *prop, unsigned int l) | 2743 | init_frame_rates(const unsigned int *prop, unsigned int l) |
2732 | { | 2744 | { |
2733 | switch (awacs_revision) { | 2745 | switch (awacs_revision) { |
2734 | case AWACS_TUMBLER: | 2746 | case AWACS_TUMBLER: |
@@ -2760,7 +2772,7 @@ set_hw_byteswap(struct device_node *io) | |||
2760 | 2772 | ||
2761 | for (mio = io->parent; mio ; mio = mio->parent) { | 2773 | for (mio = io->parent; mio ; mio = mio->parent) { |
2762 | if (strcmp(mio->name, "mac-io") == 0) { | 2774 | if (strcmp(mio->name, "mac-io") == 0) { |
2763 | if (device_is_compatible(mio, "Keylargo")) | 2775 | if (of_device_is_compatible(mio, "Keylargo")) |
2764 | kl = 1; | 2776 | kl = 1; |
2765 | break; | 2777 | break; |
2766 | } | 2778 | } |
@@ -2828,7 +2840,7 @@ int __init dmasound_awacs_init(void) | |||
2828 | #ifdef DEBUG_DMASOUND | 2840 | #ifdef DEBUG_DMASOUND |
2829 | printk("dmasound_pmac: couldn't find sound io OF node\n"); | 2841 | printk("dmasound_pmac: couldn't find sound io OF node\n"); |
2830 | #endif | 2842 | #endif |
2831 | return -ENODEV ; | 2843 | goto no_device; |
2832 | } | 2844 | } |
2833 | 2845 | ||
2834 | /* find the OF node that tells us about the sound sub-system | 2846 | /* find the OF node that tells us about the sound sub-system |
@@ -2840,7 +2852,7 @@ printk("dmasound_pmac: couldn't find sound io OF node\n"); | |||
2840 | #ifdef DEBUG_DMASOUND | 2852 | #ifdef DEBUG_DMASOUND |
2841 | printk("dmasound_pmac: couldn't find 'sound' OF node\n"); | 2853 | printk("dmasound_pmac: couldn't find 'sound' OF node\n"); |
2842 | #endif | 2854 | #endif |
2843 | return -ENODEV ; | 2855 | goto no_device; |
2844 | } | 2856 | } |
2845 | } | 2857 | } |
2846 | 2858 | ||
@@ -2849,7 +2861,7 @@ printk("dmasound_pmac: couldn't find 'sound' OF node\n"); | |||
2849 | #ifdef DEBUG_DMASOUND | 2861 | #ifdef DEBUG_DMASOUND |
2850 | printk("dmasound_pmac: couldn't find a Codec we can handle\n"); | 2862 | printk("dmasound_pmac: couldn't find a Codec we can handle\n"); |
2851 | #endif | 2863 | #endif |
2852 | return -ENODEV ; /* we don't know this type of h/w */ | 2864 | goto no_device; /* we don't know this type of h/w */ |
2853 | } | 2865 | } |
2854 | 2866 | ||
2855 | /* set up perch, ziva, SRS or whatever else we have as sound | 2867 | /* set up perch, ziva, SRS or whatever else we have as sound |
@@ -2867,11 +2879,12 @@ printk("dmasound_pmac: couldn't find a Codec we can handle\n"); | |||
2867 | * machines). | 2879 | * machines). |
2868 | */ | 2880 | */ |
2869 | if (awacs_node) { | 2881 | if (awacs_node) { |
2870 | io = awacs_node ; | 2882 | of_node_put(io); |
2883 | io = of_node_get(awacs_node); | ||
2871 | if (of_get_address(io, 2, NULL, NULL) == NULL) { | 2884 | if (of_get_address(io, 2, NULL, NULL) == NULL) { |
2872 | printk("dmasound_pmac: can't use %s\n", | 2885 | printk("dmasound_pmac: can't use %s\n", |
2873 | io->full_name); | 2886 | io->full_name); |
2874 | return -ENODEV; | 2887 | goto no_device; |
2875 | } | 2888 | } |
2876 | } else | 2889 | } else |
2877 | printk("dmasound_pmac: can't use %s\n", io->full_name); | 2890 | printk("dmasound_pmac: can't use %s\n", io->full_name); |
@@ -2882,7 +2895,7 @@ printk("dmasound_pmac: couldn't find a Codec we can handle\n"); | |||
2882 | awacs_rsrc[0].end - awacs_rsrc[0].start + 1, | 2895 | awacs_rsrc[0].end - awacs_rsrc[0].start + 1, |
2883 | " (IO)") == NULL) { | 2896 | " (IO)") == NULL) { |
2884 | printk(KERN_ERR "dmasound: can't request IO resource !\n"); | 2897 | printk(KERN_ERR "dmasound: can't request IO resource !\n"); |
2885 | return -ENODEV; | 2898 | goto no_device; |
2886 | } | 2899 | } |
2887 | if (of_address_to_resource(io, 1, &awacs_rsrc[1]) || | 2900 | if (of_address_to_resource(io, 1, &awacs_rsrc[1]) || |
2888 | request_mem_region(awacs_rsrc[1].start, | 2901 | request_mem_region(awacs_rsrc[1].start, |
@@ -2891,7 +2904,7 @@ printk("dmasound_pmac: couldn't find a Codec we can handle\n"); | |||
2891 | release_mem_region(awacs_rsrc[0].start, | 2904 | release_mem_region(awacs_rsrc[0].start, |
2892 | awacs_rsrc[0].end - awacs_rsrc[0].start + 1); | 2905 | awacs_rsrc[0].end - awacs_rsrc[0].start + 1); |
2893 | printk(KERN_ERR "dmasound: can't request Tx DMA resource !\n"); | 2906 | printk(KERN_ERR "dmasound: can't request Tx DMA resource !\n"); |
2894 | return -ENODEV; | 2907 | goto no_device; |
2895 | } | 2908 | } |
2896 | if (of_address_to_resource(io, 2, &awacs_rsrc[2]) || | 2909 | if (of_address_to_resource(io, 2, &awacs_rsrc[2]) || |
2897 | request_mem_region(awacs_rsrc[2].start, | 2910 | request_mem_region(awacs_rsrc[2].start, |
@@ -2902,7 +2915,7 @@ printk("dmasound_pmac: couldn't find a Codec we can handle\n"); | |||
2902 | release_mem_region(awacs_rsrc[1].start, | 2915 | release_mem_region(awacs_rsrc[1].start, |
2903 | awacs_rsrc[1].end - awacs_rsrc[1].start + 1); | 2916 | awacs_rsrc[1].end - awacs_rsrc[1].start + 1); |
2904 | printk(KERN_ERR "dmasound: can't request Rx DMA resource !\n"); | 2917 | printk(KERN_ERR "dmasound: can't request Rx DMA resource !\n"); |
2905 | return -ENODEV; | 2918 | goto no_device; |
2906 | } | 2919 | } |
2907 | 2920 | ||
2908 | awacs_beep_dev = input_allocate_device(); | 2921 | awacs_beep_dev = input_allocate_device(); |
@@ -2914,7 +2927,7 @@ printk("dmasound_pmac: couldn't find a Codec we can handle\n"); | |||
2914 | release_mem_region(awacs_rsrc[2].start, | 2927 | release_mem_region(awacs_rsrc[2].start, |
2915 | awacs_rsrc[2].end - awacs_rsrc[2].start + 1); | 2928 | awacs_rsrc[2].end - awacs_rsrc[2].start + 1); |
2916 | printk(KERN_ERR "dmasound: can't allocate input device !\n"); | 2929 | printk(KERN_ERR "dmasound: can't allocate input device !\n"); |
2917 | return -ENOMEM; | 2930 | goto no_device; |
2918 | } | 2931 | } |
2919 | 2932 | ||
2920 | awacs_beep_dev->name = "dmasound beeper"; | 2933 | awacs_beep_dev->name = "dmasound beeper"; |
@@ -2942,7 +2955,8 @@ printk("dmasound_pmac: couldn't find a Codec we can handle\n"); | |||
2942 | awacs_rx_irq = irq_of_parse_and_map(io, 2); | 2955 | awacs_rx_irq = irq_of_parse_and_map(io, 2); |
2943 | 2956 | ||
2944 | /* Hack for legacy crap that will be killed someday */ | 2957 | /* Hack for legacy crap that will be killed someday */ |
2945 | awacs_node = io; | 2958 | of_node_put(awacs_node); |
2959 | awacs_node = of_node_get(io); | ||
2946 | 2960 | ||
2947 | /* if we have an awacs or screamer - probe the chip to make | 2961 | /* if we have an awacs or screamer - probe the chip to make |
2948 | * sure we have the right revision. | 2962 | * sure we have the right revision. |
@@ -2973,24 +2987,26 @@ printk("dmasound_pmac: Awacs/Screamer Codec Mfct: %d Rev %d\n", mfg, rev); | |||
2973 | */ | 2987 | */ |
2974 | 2988 | ||
2975 | if (info) { | 2989 | if (info) { |
2976 | unsigned int *prop, l; | 2990 | const unsigned int *prop; |
2991 | unsigned int l; | ||
2977 | 2992 | ||
2978 | sound_device_id = 0; | 2993 | sound_device_id = 0; |
2979 | /* device ID appears post g3 b&w */ | 2994 | /* device ID appears post g3 b&w */ |
2980 | prop = (unsigned int *)get_property(info, "device-id", NULL); | 2995 | prop = of_get_property(info, "device-id", NULL); |
2981 | if (prop != 0) | 2996 | if (prop != 0) |
2982 | sound_device_id = *prop; | 2997 | sound_device_id = *prop; |
2983 | 2998 | ||
2984 | /* look for a property saying what sample rates | 2999 | /* look for a property saying what sample rates |
2985 | are available */ | 3000 | are available */ |
2986 | 3001 | ||
2987 | prop = (unsigned int *)get_property(info, "sample-rates", &l); | 3002 | prop = of_get_property(info, "sample-rates", &l); |
2988 | if (prop == 0) | 3003 | if (prop == 0) |
2989 | prop = (unsigned int *) get_property | 3004 | prop = of_get_property(info, "output-frame-rates", &l); |
2990 | (info, "output-frame-rates", &l); | ||
2991 | 3005 | ||
2992 | /* if it's there use it to set up frame rates */ | 3006 | /* if it's there use it to set up frame rates */ |
2993 | init_frame_rates(prop, l) ; | 3007 | init_frame_rates(prop, l) ; |
3008 | of_node_put(info); | ||
3009 | info = NULL; | ||
2994 | } | 3010 | } |
2995 | 3011 | ||
2996 | if (awacs) | 3012 | if (awacs) |
@@ -3160,7 +3176,16 @@ printk("dmasound_pmac: Awacs/Screamer Codec Mfct: %d Rev %d\n", mfg, rev); | |||
3160 | */ | 3176 | */ |
3161 | input_register_device(awacs_beep_dev); | 3177 | input_register_device(awacs_beep_dev); |
3162 | 3178 | ||
3179 | of_node_put(io); | ||
3180 | |||
3163 | return dmasound_init(); | 3181 | return dmasound_init(); |
3182 | |||
3183 | no_device: | ||
3184 | of_node_put(info); | ||
3185 | of_node_put(awacs_node); | ||
3186 | of_node_put(i2s_node); | ||
3187 | of_node_put(io); | ||
3188 | return -ENODEV ; | ||
3164 | } | 3189 | } |
3165 | 3190 | ||
3166 | static void __exit dmasound_awacs_cleanup(void) | 3191 | static void __exit dmasound_awacs_cleanup(void) |
@@ -3179,6 +3204,8 @@ static void __exit dmasound_awacs_cleanup(void) | |||
3179 | } | 3204 | } |
3180 | dmasound_deinit(); | 3205 | dmasound_deinit(); |
3181 | 3206 | ||
3207 | of_node_put(awacs_node); | ||
3208 | of_node_put(i2s_node); | ||
3182 | } | 3209 | } |
3183 | 3210 | ||
3184 | MODULE_DESCRIPTION("PowerMac built-in audio driver."); | 3211 | MODULE_DESCRIPTION("PowerMac built-in audio driver."); |
diff --git a/sound/oss/dmasound/tas_common.c b/sound/oss/dmasound/tas_common.c index 665e85b556..b295ef6821 100644 --- a/sound/oss/dmasound/tas_common.c +++ b/sound/oss/dmasound/tas_common.c | |||
@@ -41,7 +41,6 @@ | |||
41 | 41 | ||
42 | static u8 tas_i2c_address = 0x34; | 42 | static u8 tas_i2c_address = 0x34; |
43 | static struct i2c_client *tas_client; | 43 | static struct i2c_client *tas_client; |
44 | static struct device_node* tas_node; | ||
45 | 44 | ||
46 | static int tas_attach_adapter(struct i2c_adapter *); | 45 | static int tas_attach_adapter(struct i2c_adapter *); |
47 | static int tas_detach_client(struct i2c_client *); | 46 | static int tas_detach_client(struct i2c_client *); |
@@ -190,17 +189,18 @@ tas_cleanup(void) | |||
190 | int __init | 189 | int __init |
191 | tas_init(int driver_id, const char *driver_name) | 190 | tas_init(int driver_id, const char *driver_name) |
192 | { | 191 | { |
193 | u32* paddr; | 192 | const u32* paddr; |
193 | struct device_node *tas_node; | ||
194 | 194 | ||
195 | printk(KERN_INFO "tas driver [%s])\n", driver_name); | 195 | printk(KERN_INFO "tas driver [%s])\n", driver_name); |
196 | 196 | ||
197 | #ifndef CONFIG_I2C_POWERMAC | 197 | #ifndef CONFIG_I2C_POWERMAC |
198 | request_module("i2c-powermac"); | 198 | request_module("i2c-powermac"); |
199 | #endif | 199 | #endif |
200 | tas_node = find_devices("deq"); | 200 | tas_node = of_find_node_by_name("deq"); |
201 | if (tas_node == NULL) | 201 | if (tas_node == NULL) |
202 | return -ENODEV; | 202 | return -ENODEV; |
203 | paddr = (u32 *)get_property(tas_node, "i2c-address", NULL); | 203 | paddr = of_get_property(tas_node, "i2c-address", NULL); |
204 | if (paddr) { | 204 | if (paddr) { |
205 | tas_i2c_address = (*paddr) >> 1; | 205 | tas_i2c_address = (*paddr) >> 1; |
206 | printk(KERN_INFO "using i2c address: 0x%x from device-tree\n", | 206 | printk(KERN_INFO "using i2c address: 0x%x from device-tree\n", |
@@ -208,6 +208,7 @@ tas_init(int driver_id, const char *driver_name) | |||
208 | } else | 208 | } else |
209 | printk(KERN_INFO "using i2c address: 0x%x (default)\n", | 209 | printk(KERN_INFO "using i2c address: 0x%x (default)\n", |
210 | tas_i2c_address); | 210 | tas_i2c_address); |
211 | of_node_put(tas_node); | ||
211 | 212 | ||
212 | return i2c_add_driver(&tas_driver); | 213 | return i2c_add_driver(&tas_driver); |
213 | } | 214 | } |
diff --git a/sound/oss/dmasound/tas_ioctl.h b/sound/oss/dmasound/tas_ioctl.h index dccae3a40e..9d12b373b4 100644 --- a/sound/oss/dmasound/tas_ioctl.h +++ b/sound/oss/dmasound/tas_ioctl.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef _TAS_IOCTL_H_ | 1 | #ifndef _TAS_IOCTL_H_ |
2 | #define _TAS_IOCTL_H_ | 2 | #define _TAS_IOCTL_H_ |
3 | 3 | ||
4 | #include <linux/i2c.h> | ||
5 | #include <linux/soundcard.h> | 4 | #include <linux/soundcard.h> |
6 | 5 | ||
7 | 6 | ||
diff --git a/sound/oss/es1371.c b/sound/oss/es1371.c index 974dd732b1..593a3aac12 100644 --- a/sound/oss/es1371.c +++ b/sound/oss/es1371.c | |||
@@ -100,7 +100,7 @@ | |||
100 | * Tjeerd Mulder <tjeerd.mulder@fujitsu-siemens.com> | 100 | * Tjeerd Mulder <tjeerd.mulder@fujitsu-siemens.com> |
101 | * 05.01.2001 0.29 Hopefully updates will not be required anymore when Creative bumps | 101 | * 05.01.2001 0.29 Hopefully updates will not be required anymore when Creative bumps |
102 | * the CT5880 revision. | 102 | * the CT5880 revision. |
103 | * suggested by Stephan Müller <smueller@chronox.de> | 103 | * suggested by Stephan Müller <smueller@chronox.de> |
104 | * 31.01.2001 0.30 Register/Unregister gameport | 104 | * 31.01.2001 0.30 Register/Unregister gameport |
105 | * Fix SETTRIGGER non OSS API conformity | 105 | * Fix SETTRIGGER non OSS API conformity |
106 | * 14.07.2001 0.31 Add list of laptops needing amplifier control | 106 | * 14.07.2001 0.31 Add list of laptops needing amplifier control |
diff --git a/sound/oss/pas2_pcm.c b/sound/oss/pas2_pcm.c index 4af6aafa3d..36c3ea6208 100644 --- a/sound/oss/pas2_pcm.c +++ b/sound/oss/pas2_pcm.c | |||
@@ -85,7 +85,7 @@ static int pcm_set_speed(int arg) | |||
85 | * come from the SDK found on ftp.uwp.edu:/pub/msdos/proaudio/. | 85 | * come from the SDK found on ftp.uwp.edu:/pub/msdos/proaudio/. |
86 | * | 86 | * |
87 | * I cleared bit 5 of these values, since that bit controls the master | 87 | * I cleared bit 5 of these values, since that bit controls the master |
88 | * mute flag. (Olav Wölfelschneider) | 88 | * mute flag. (Olav Wölfelschneider) |
89 | * | 89 | * |
90 | */ | 90 | */ |
91 | #if !defined NO_AUTO_FILTER_SET | 91 | #if !defined NO_AUTO_FILTER_SET |
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c index 7ea9accc2b..b493660deb 100644 --- a/sound/oss/sh_dac_audio.c +++ b/sound/oss/sh_dac_audio.c | |||
@@ -104,7 +104,7 @@ static void dac_audio_set_rate(void) | |||
104 | unsigned long interval; | 104 | unsigned long interval; |
105 | struct clk *clk; | 105 | struct clk *clk; |
106 | 106 | ||
107 | clk = clk_get("module_clk"); | 107 | clk = clk_get(NULL, "module_clk"); |
108 | interval = (clk_get_rate(clk) / 4) / rate; | 108 | interval = (clk_get_rate(clk) / 4) / rate; |
109 | clk_put(clk); | 109 | clk_put(clk); |
110 | ctrl_outl(interval, TMU1_TCOR); | 110 | ctrl_outl(interval, TMU1_TCOR); |
diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c index dcd8d6d2f5..a9c23b2502 100644 --- a/sound/oss/soundcard.c +++ b/sound/oss/soundcard.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <linux/smp_lock.h> | 44 | #include <linux/smp_lock.h> |
45 | #include <linux/module.h> | 45 | #include <linux/module.h> |
46 | #include <linux/mm.h> | 46 | #include <linux/mm.h> |
47 | #include <linux/device.h> | ||
47 | 48 | ||
48 | /* | 49 | /* |
49 | * This ought to be moved into include/asm/dma.h | 50 | * This ought to be moved into include/asm/dma.h |
diff --git a/sound/oss/swarm_cs4297a.c b/sound/oss/swarm_cs4297a.c index 016b918329..a8057f2595 100644 --- a/sound/oss/swarm_cs4297a.c +++ b/sound/oss/swarm_cs4297a.c | |||
@@ -75,7 +75,6 @@ | |||
75 | #include <linux/interrupt.h> | 75 | #include <linux/interrupt.h> |
76 | #include <linux/init.h> | 76 | #include <linux/init.h> |
77 | #include <linux/poll.h> | 77 | #include <linux/poll.h> |
78 | #include <linux/smp_lock.h> | ||
79 | #include <linux/mutex.h> | 78 | #include <linux/mutex.h> |
80 | #include <linux/kernel.h> | 79 | #include <linux/kernel.h> |
81 | 80 | ||
diff --git a/sound/oss/trident.c b/sound/oss/trident.c index 72a8a0ed36..3bc1f6e9e4 100644 --- a/sound/oss/trident.c +++ b/sound/oss/trident.c | |||
@@ -18,7 +18,7 @@ | |||
18 | * Ollie Lho <ollie@sis.com.tw> SiS 7018 Audio Core Support | 18 | * Ollie Lho <ollie@sis.com.tw> SiS 7018 Audio Core Support |
19 | * Ching-Ling Lee <cling-li@ali.com.tw> ALi 5451 Audio Core Support | 19 | * Ching-Ling Lee <cling-li@ali.com.tw> ALi 5451 Audio Core Support |
20 | * Matt Wu <mattwu@acersoftech.com.cn> ALi 5451 Audio Core Support | 20 | * Matt Wu <mattwu@acersoftech.com.cn> ALi 5451 Audio Core Support |
21 | * Peter Wächtler <pwaechtler@loewe-komp.de> CyberPro5050 support | 21 | * Peter Wächtler <pwaechtler@loewe-komp.de> CyberPro5050 support |
22 | * Muli Ben-Yehuda <mulix@mulix.org> | 22 | * Muli Ben-Yehuda <mulix@mulix.org> |
23 | * | 23 | * |
24 | * | 24 | * |
@@ -89,7 +89,7 @@ | |||
89 | * use set_current_state, properly release resources on failure in | 89 | * use set_current_state, properly release resources on failure in |
90 | * trident_probe, get rid of check_region | 90 | * trident_probe, get rid of check_region |
91 | * v0.14.9c | 91 | * v0.14.9c |
92 | * August 10 2001 Peter Wächtler <pwaechtler@loewe-komp.de> | 92 | * August 10 2001 Peter Wächtler <pwaechtler@loewe-komp.de> |
93 | * added support for Tvia (formerly Integraphics/IGST) CyberPro5050 | 93 | * added support for Tvia (formerly Integraphics/IGST) CyberPro5050 |
94 | * this chip is often found in settop boxes (combined video+audio) | 94 | * this chip is often found in settop boxes (combined video+audio) |
95 | * v0.14.9b | 95 | * v0.14.9b |
@@ -207,7 +207,6 @@ | |||
207 | #include <linux/init.h> | 207 | #include <linux/init.h> |
208 | #include <linux/poll.h> | 208 | #include <linux/poll.h> |
209 | #include <linux/spinlock.h> | 209 | #include <linux/spinlock.h> |
210 | #include <linux/smp_lock.h> | ||
211 | #include <linux/ac97_codec.h> | 210 | #include <linux/ac97_codec.h> |
212 | #include <linux/bitops.h> | 211 | #include <linux/bitops.h> |
213 | #include <linux/proc_fs.h> | 212 | #include <linux/proc_fs.h> |
diff --git a/sound/oss/via82cxxx_audio.c b/sound/oss/via82cxxx_audio.c index 7ab3a732e1..5d3c0372df 100644 --- a/sound/oss/via82cxxx_audio.c +++ b/sound/oss/via82cxxx_audio.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/poll.h> | 32 | #include <linux/poll.h> |
33 | #include <linux/soundcard.h> | 33 | #include <linux/soundcard.h> |
34 | #include <linux/ac97_codec.h> | 34 | #include <linux/ac97_codec.h> |
35 | #include <linux/smp_lock.h> | ||
36 | #include <linux/ioport.h> | 35 | #include <linux/ioport.h> |
37 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
38 | #include <linux/dma-mapping.h> | 37 | #include <linux/dma-mapping.h> |