diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-03-23 19:36:20 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-03-23 19:36:20 -0400 |
commit | d7b6df5d1af11544401ca051aaf68b6e7f110c0e (patch) | |
tree | 9c155be7d0ad77115a10094ab2d71b88efee6ca3 /sound/ppc | |
parent | 7df4f694356a125e4553ca35b215fd9e88e858c5 (diff) | |
parent | 39661758631da37efbc961e57a4ddefad573cc52 (diff) |
Merge branch 'topic/powermac' into for-linus
Diffstat (limited to 'sound/ppc')
-rw-r--r-- | sound/ppc/Kconfig | 1 | ||||
-rw-r--r-- | sound/ppc/awacs.c | 88 | ||||
-rw-r--r-- | sound/ppc/burgundy.c | 2 | ||||
-rw-r--r-- | sound/ppc/daca.c | 2 | ||||
-rw-r--r-- | sound/ppc/pmac.c | 11 | ||||
-rw-r--r-- | sound/ppc/powermac.c | 2 | ||||
-rw-r--r-- | sound/ppc/tumbler.c | 13 |
7 files changed, 95 insertions, 24 deletions
diff --git a/sound/ppc/Kconfig b/sound/ppc/Kconfig index 777de2b1717..bd2338ab2ce 100644 --- a/sound/ppc/Kconfig +++ b/sound/ppc/Kconfig | |||
@@ -13,6 +13,7 @@ config SND_POWERMAC | |||
13 | tristate "PowerMac (AWACS, DACA, Burgundy, Tumbler, Keywest)" | 13 | tristate "PowerMac (AWACS, DACA, Burgundy, Tumbler, Keywest)" |
14 | depends on I2C && INPUT && PPC_PMAC | 14 | depends on I2C && INPUT && PPC_PMAC |
15 | select SND_PCM | 15 | select SND_PCM |
16 | select SND_VMASTER | ||
16 | help | 17 | help |
17 | Say Y here to include support for the integrated sound device. | 18 | Say Y here to include support for the integrated sound device. |
18 | 19 | ||
diff --git a/sound/ppc/awacs.c b/sound/ppc/awacs.c index 7bd33e6552a..80df9b1f651 100644 --- a/sound/ppc/awacs.c +++ b/sound/ppc/awacs.c | |||
@@ -608,9 +608,12 @@ static struct snd_kcontrol_new snd_pmac_screamer_mixers_beige[] __initdata = { | |||
608 | AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_LINE, 0), | 608 | AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_LINE, 0), |
609 | }; | 609 | }; |
610 | 610 | ||
611 | static struct snd_kcontrol_new snd_pmac_screamer_mixers_imac[] __initdata = { | 611 | static struct snd_kcontrol_new snd_pmac_screamer_mixers_lo[] __initdata = { |
612 | AWACS_VOLUME("Line out Playback Volume", 2, 6, 1), | 612 | AWACS_VOLUME("Line out Playback Volume", 2, 6, 1), |
613 | AWACS_VOLUME("Master Playback Volume", 5, 6, 1), | 613 | }; |
614 | |||
615 | static struct snd_kcontrol_new snd_pmac_screamer_mixers_imac[] __initdata = { | ||
616 | AWACS_VOLUME("Play-through Playback Volume", 5, 6, 1), | ||
614 | AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_CD, 0), | 617 | AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_CD, 0), |
615 | }; | 618 | }; |
616 | 619 | ||
@@ -627,6 +630,10 @@ static struct snd_kcontrol_new snd_pmac_awacs_mixers_pmac7500[] __initdata = { | |||
627 | AWACS_SWITCH("Line Capture Switch", 0, SHIFT_MUX_MIC, 0), | 630 | AWACS_SWITCH("Line Capture Switch", 0, SHIFT_MUX_MIC, 0), |
628 | }; | 631 | }; |
629 | 632 | ||
633 | static struct snd_kcontrol_new snd_pmac_awacs_mixers_pmac5500[] __initdata = { | ||
634 | AWACS_VOLUME("Headphone Playback Volume", 2, 6, 1), | ||
635 | }; | ||
636 | |||
630 | static struct snd_kcontrol_new snd_pmac_awacs_mixers_pmac[] __initdata = { | 637 | static struct snd_kcontrol_new snd_pmac_awacs_mixers_pmac[] __initdata = { |
631 | AWACS_VOLUME("Master Playback Volume", 2, 6, 1), | 638 | AWACS_VOLUME("Master Playback Volume", 2, 6, 1), |
632 | AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_CD, 0), | 639 | AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_CD, 0), |
@@ -645,12 +652,19 @@ static struct snd_kcontrol_new snd_pmac_screamer_mixers2[] __initdata = { | |||
645 | AWACS_SWITCH("Mic Capture Switch", 0, SHIFT_MUX_LINE, 0), | 652 | AWACS_SWITCH("Mic Capture Switch", 0, SHIFT_MUX_LINE, 0), |
646 | }; | 653 | }; |
647 | 654 | ||
655 | static struct snd_kcontrol_new snd_pmac_awacs_mixers2_pmac5500[] __initdata = { | ||
656 | AWACS_SWITCH("CD Capture Switch", 0, SHIFT_MUX_CD, 0), | ||
657 | }; | ||
658 | |||
648 | static struct snd_kcontrol_new snd_pmac_awacs_master_sw __initdata = | 659 | static struct snd_kcontrol_new snd_pmac_awacs_master_sw __initdata = |
649 | AWACS_SWITCH("Master Playback Switch", 1, SHIFT_HDMUTE, 1); | 660 | AWACS_SWITCH("Master Playback Switch", 1, SHIFT_HDMUTE, 1); |
650 | 661 | ||
651 | static struct snd_kcontrol_new snd_pmac_awacs_master_sw_imac __initdata = | 662 | static struct snd_kcontrol_new snd_pmac_awacs_master_sw_imac __initdata = |
652 | AWACS_SWITCH("Line out Playback Switch", 1, SHIFT_HDMUTE, 1); | 663 | AWACS_SWITCH("Line out Playback Switch", 1, SHIFT_HDMUTE, 1); |
653 | 664 | ||
665 | static struct snd_kcontrol_new snd_pmac_awacs_master_sw_pmac5500 __initdata = | ||
666 | AWACS_SWITCH("Headphone Playback Switch", 1, SHIFT_HDMUTE, 1); | ||
667 | |||
654 | static struct snd_kcontrol_new snd_pmac_awacs_mic_boost[] __initdata = { | 668 | static struct snd_kcontrol_new snd_pmac_awacs_mic_boost[] __initdata = { |
655 | AWACS_SWITCH("Mic Boost Capture Switch", 0, SHIFT_GAINLINE, 0), | 669 | AWACS_SWITCH("Mic Boost Capture Switch", 0, SHIFT_GAINLINE, 0), |
656 | }; | 670 | }; |
@@ -766,12 +780,16 @@ static void snd_pmac_awacs_resume(struct snd_pmac *chip) | |||
766 | } | 780 | } |
767 | #endif /* CONFIG_PM */ | 781 | #endif /* CONFIG_PM */ |
768 | 782 | ||
769 | #define IS_PM7500 (machine_is_compatible("AAPL,7500")) | 783 | #define IS_PM7500 (machine_is_compatible("AAPL,7500") \ |
784 | || machine_is_compatible("AAPL,8500") \ | ||
785 | || machine_is_compatible("AAPL,9500")) | ||
786 | #define IS_PM5500 (machine_is_compatible("AAPL,e411")) | ||
770 | #define IS_BEIGE (machine_is_compatible("AAPL,Gossamer")) | 787 | #define IS_BEIGE (machine_is_compatible("AAPL,Gossamer")) |
771 | #define IS_IMAC1 (machine_is_compatible("PowerMac2,1")) | 788 | #define IS_IMAC1 (machine_is_compatible("PowerMac2,1")) |
772 | #define IS_IMAC2 (machine_is_compatible("PowerMac2,2") \ | 789 | #define IS_IMAC2 (machine_is_compatible("PowerMac2,2") \ |
773 | || machine_is_compatible("PowerMac4,1")) | 790 | || machine_is_compatible("PowerMac4,1")) |
774 | #define IS_G4AGP (machine_is_compatible("PowerMac3,1")) | 791 | #define IS_G4AGP (machine_is_compatible("PowerMac3,1")) |
792 | #define IS_LOMBARD (machine_is_compatible("PowerBook1,1")) | ||
775 | 793 | ||
776 | static int imac1, imac2; | 794 | static int imac1, imac2; |
777 | 795 | ||
@@ -858,10 +876,14 @@ int __init | |||
858 | snd_pmac_awacs_init(struct snd_pmac *chip) | 876 | snd_pmac_awacs_init(struct snd_pmac *chip) |
859 | { | 877 | { |
860 | int pm7500 = IS_PM7500; | 878 | int pm7500 = IS_PM7500; |
879 | int pm5500 = IS_PM5500; | ||
861 | int beige = IS_BEIGE; | 880 | int beige = IS_BEIGE; |
862 | int g4agp = IS_G4AGP; | 881 | int g4agp = IS_G4AGP; |
882 | int lombard = IS_LOMBARD; | ||
863 | int imac; | 883 | int imac; |
864 | int err, vol; | 884 | int err, vol; |
885 | struct snd_kcontrol *vmaster_sw, *vmaster_vol; | ||
886 | struct snd_kcontrol *master_vol, *speaker_vol; | ||
865 | 887 | ||
866 | imac1 = IS_IMAC1; | 888 | imac1 = IS_IMAC1; |
867 | imac2 = IS_IMAC2; | 889 | imac2 = IS_IMAC2; |
@@ -915,7 +937,7 @@ snd_pmac_awacs_init(struct snd_pmac *chip) | |||
915 | /* set headphone-jack detection bit */ | 937 | /* set headphone-jack detection bit */ |
916 | switch (chip->model) { | 938 | switch (chip->model) { |
917 | case PMAC_AWACS: | 939 | case PMAC_AWACS: |
918 | chip->hp_stat_mask = pm7500 ? MASK_HDPCONN | 940 | chip->hp_stat_mask = pm7500 || pm5500 ? MASK_HDPCONN |
919 | : MASK_LOCONN; | 941 | : MASK_LOCONN; |
920 | break; | 942 | break; |
921 | case PMAC_SCREAMER: | 943 | case PMAC_SCREAMER: |
@@ -954,7 +976,7 @@ snd_pmac_awacs_init(struct snd_pmac *chip) | |||
954 | return err; | 976 | return err; |
955 | if (beige || g4agp) | 977 | if (beige || g4agp) |
956 | ; | 978 | ; |
957 | else if (chip->model == PMAC_SCREAMER) | 979 | else if (chip->model == PMAC_SCREAMER || pm5500) |
958 | err = build_mixers(chip, ARRAY_SIZE(snd_pmac_screamer_mixers2), | 980 | err = build_mixers(chip, ARRAY_SIZE(snd_pmac_screamer_mixers2), |
959 | snd_pmac_screamer_mixers2); | 981 | snd_pmac_screamer_mixers2); |
960 | else if (!pm7500) | 982 | else if (!pm7500) |
@@ -962,19 +984,35 @@ snd_pmac_awacs_init(struct snd_pmac *chip) | |||
962 | snd_pmac_awacs_mixers2); | 984 | snd_pmac_awacs_mixers2); |
963 | if (err < 0) | 985 | if (err < 0) |
964 | return err; | 986 | return err; |
987 | if (pm5500) { | ||
988 | err = build_mixers(chip, | ||
989 | ARRAY_SIZE(snd_pmac_awacs_mixers2_pmac5500), | ||
990 | snd_pmac_awacs_mixers2_pmac5500); | ||
991 | if (err < 0) | ||
992 | return err; | ||
993 | } | ||
965 | if (pm7500) | 994 | if (pm7500) |
966 | err = build_mixers(chip, | 995 | err = build_mixers(chip, |
967 | ARRAY_SIZE(snd_pmac_awacs_mixers_pmac7500), | 996 | ARRAY_SIZE(snd_pmac_awacs_mixers_pmac7500), |
968 | snd_pmac_awacs_mixers_pmac7500); | 997 | snd_pmac_awacs_mixers_pmac7500); |
998 | else if (pm5500) | ||
999 | err = snd_ctl_add(chip->card, | ||
1000 | (master_vol = snd_ctl_new1(snd_pmac_awacs_mixers_pmac5500, | ||
1001 | chip))); | ||
969 | else if (beige) | 1002 | else if (beige) |
970 | err = build_mixers(chip, | 1003 | err = build_mixers(chip, |
971 | ARRAY_SIZE(snd_pmac_screamer_mixers_beige), | 1004 | ARRAY_SIZE(snd_pmac_screamer_mixers_beige), |
972 | snd_pmac_screamer_mixers_beige); | 1005 | snd_pmac_screamer_mixers_beige); |
973 | else if (imac) | 1006 | else if (imac || lombard) { |
1007 | err = snd_ctl_add(chip->card, | ||
1008 | (master_vol = snd_ctl_new1(snd_pmac_screamer_mixers_lo, | ||
1009 | chip))); | ||
1010 | if (err < 0) | ||
1011 | return err; | ||
974 | err = build_mixers(chip, | 1012 | err = build_mixers(chip, |
975 | ARRAY_SIZE(snd_pmac_screamer_mixers_imac), | 1013 | ARRAY_SIZE(snd_pmac_screamer_mixers_imac), |
976 | snd_pmac_screamer_mixers_imac); | 1014 | snd_pmac_screamer_mixers_imac); |
977 | else if (g4agp) | 1015 | } else if (g4agp) |
978 | err = build_mixers(chip, | 1016 | err = build_mixers(chip, |
979 | ARRAY_SIZE(snd_pmac_screamer_mixers_g4agp), | 1017 | ARRAY_SIZE(snd_pmac_screamer_mixers_g4agp), |
980 | snd_pmac_screamer_mixers_g4agp); | 1018 | snd_pmac_screamer_mixers_g4agp); |
@@ -984,8 +1022,10 @@ snd_pmac_awacs_init(struct snd_pmac *chip) | |||
984 | snd_pmac_awacs_mixers_pmac); | 1022 | snd_pmac_awacs_mixers_pmac); |
985 | if (err < 0) | 1023 | if (err < 0) |
986 | return err; | 1024 | return err; |
987 | chip->master_sw_ctl = snd_ctl_new1((pm7500 || imac || g4agp) | 1025 | chip->master_sw_ctl = snd_ctl_new1((pm7500 || imac || g4agp || lombard) |
988 | ? &snd_pmac_awacs_master_sw_imac | 1026 | ? &snd_pmac_awacs_master_sw_imac |
1027 | : pm5500 | ||
1028 | ? &snd_pmac_awacs_master_sw_pmac5500 | ||
989 | : &snd_pmac_awacs_master_sw, chip); | 1029 | : &snd_pmac_awacs_master_sw, chip); |
990 | err = snd_ctl_add(chip->card, chip->master_sw_ctl); | 1030 | err = snd_ctl_add(chip->card, chip->master_sw_ctl); |
991 | if (err < 0) | 1031 | if (err < 0) |
@@ -1017,8 +1057,9 @@ snd_pmac_awacs_init(struct snd_pmac *chip) | |||
1017 | #endif /* PMAC_AMP_AVAIL */ | 1057 | #endif /* PMAC_AMP_AVAIL */ |
1018 | { | 1058 | { |
1019 | /* route A = headphone, route C = speaker */ | 1059 | /* route A = headphone, route C = speaker */ |
1020 | err = build_mixers(chip, ARRAY_SIZE(snd_pmac_awacs_speaker_vol), | 1060 | err = snd_ctl_add(chip->card, |
1021 | snd_pmac_awacs_speaker_vol); | 1061 | (speaker_vol = snd_ctl_new1(snd_pmac_awacs_speaker_vol, |
1062 | chip))); | ||
1022 | if (err < 0) | 1063 | if (err < 0) |
1023 | return err; | 1064 | return err; |
1024 | chip->speaker_sw_ctl = snd_ctl_new1(imac1 | 1065 | chip->speaker_sw_ctl = snd_ctl_new1(imac1 |
@@ -1031,6 +1072,33 @@ snd_pmac_awacs_init(struct snd_pmac *chip) | |||
1031 | return err; | 1072 | return err; |
1032 | } | 1073 | } |
1033 | 1074 | ||
1075 | if (pm5500 || imac || lombard) { | ||
1076 | vmaster_sw = snd_ctl_make_virtual_master( | ||
1077 | "Master Playback Switch", (unsigned int *) NULL); | ||
1078 | err = snd_ctl_add_slave_uncached(vmaster_sw, | ||
1079 | chip->master_sw_ctl); | ||
1080 | if (err < 0) | ||
1081 | return err; | ||
1082 | err = snd_ctl_add_slave_uncached(vmaster_sw, | ||
1083 | chip->speaker_sw_ctl); | ||
1084 | if (err < 0) | ||
1085 | return err; | ||
1086 | err = snd_ctl_add(chip->card, vmaster_sw); | ||
1087 | if (err < 0) | ||
1088 | return err; | ||
1089 | vmaster_vol = snd_ctl_make_virtual_master( | ||
1090 | "Master Playback Volume", (unsigned int *) NULL); | ||
1091 | err = snd_ctl_add_slave(vmaster_vol, master_vol); | ||
1092 | if (err < 0) | ||
1093 | return err; | ||
1094 | err = snd_ctl_add_slave(vmaster_vol, speaker_vol); | ||
1095 | if (err < 0) | ||
1096 | return err; | ||
1097 | err = snd_ctl_add(chip->card, vmaster_vol); | ||
1098 | if (err < 0) | ||
1099 | return err; | ||
1100 | } | ||
1101 | |||
1034 | if (beige || g4agp) | 1102 | if (beige || g4agp) |
1035 | err = build_mixers(chip, | 1103 | err = build_mixers(chip, |
1036 | ARRAY_SIZE(snd_pmac_screamer_mic_boost_beige), | 1104 | ARRAY_SIZE(snd_pmac_screamer_mic_boost_beige), |
diff --git a/sound/ppc/burgundy.c b/sound/ppc/burgundy.c index f860d39af36..45a76297c38 100644 --- a/sound/ppc/burgundy.c +++ b/sound/ppc/burgundy.c | |||
@@ -35,7 +35,7 @@ snd_pmac_burgundy_busy_wait(struct snd_pmac *chip) | |||
35 | int timeout = 50; | 35 | int timeout = 50; |
36 | while ((in_le32(&chip->awacs->codec_ctrl) & MASK_NEWECMD) && timeout--) | 36 | while ((in_le32(&chip->awacs->codec_ctrl) & MASK_NEWECMD) && timeout--) |
37 | udelay(1); | 37 | udelay(1); |
38 | if (! timeout) | 38 | if (timeout < 0) |
39 | printk(KERN_DEBUG "burgundy_busy_wait: timeout\n"); | 39 | printk(KERN_DEBUG "burgundy_busy_wait: timeout\n"); |
40 | } | 40 | } |
41 | 41 | ||
diff --git a/sound/ppc/daca.c b/sound/ppc/daca.c index 8a5b2903193..f8d478c2da6 100644 --- a/sound/ppc/daca.c +++ b/sound/ppc/daca.c | |||
@@ -82,7 +82,7 @@ static int daca_set_volume(struct pmac_daca *mix) | |||
82 | data[1] |= mix->deemphasis ? 0x40 : 0; | 82 | data[1] |= mix->deemphasis ? 0x40 : 0; |
83 | if (i2c_smbus_write_block_data(mix->i2c.client, DACA_REG_AVOL, | 83 | if (i2c_smbus_write_block_data(mix->i2c.client, DACA_REG_AVOL, |
84 | 2, data) < 0) { | 84 | 2, data) < 0) { |
85 | snd_printk("failed to set volume \n"); | 85 | snd_printk(KERN_ERR "failed to set volume \n"); |
86 | return -EINVAL; | 86 | return -EINVAL; |
87 | } | 87 | } |
88 | return 0; | 88 | return 0; |
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index af76ee862d2..9b4e9c31669 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c | |||
@@ -299,7 +299,7 @@ static int snd_pmac_pcm_trigger(struct snd_pmac *chip, struct pmac_stream *rec, | |||
299 | case SNDRV_PCM_TRIGGER_SUSPEND: | 299 | case SNDRV_PCM_TRIGGER_SUSPEND: |
300 | spin_lock(&chip->reg_lock); | 300 | spin_lock(&chip->reg_lock); |
301 | rec->running = 0; | 301 | rec->running = 0; |
302 | /*printk("stopped!!\n");*/ | 302 | /*printk(KERN_DEBUG "stopped!!\n");*/ |
303 | snd_pmac_dma_stop(rec); | 303 | snd_pmac_dma_stop(rec); |
304 | for (i = 0, cp = rec->cmd.cmds; i < rec->nperiods; i++, cp++) | 304 | for (i = 0, cp = rec->cmd.cmds; i < rec->nperiods; i++, cp++) |
305 | out_le16(&cp->command, DBDMA_STOP); | 305 | out_le16(&cp->command, DBDMA_STOP); |
@@ -334,7 +334,7 @@ static snd_pcm_uframes_t snd_pmac_pcm_pointer(struct snd_pmac *chip, | |||
334 | } | 334 | } |
335 | #endif | 335 | #endif |
336 | count += rec->cur_period * rec->period_size; | 336 | count += rec->cur_period * rec->period_size; |
337 | /*printk("pointer=%d\n", count);*/ | 337 | /*printk(KERN_DEBUG "pointer=%d\n", count);*/ |
338 | return bytes_to_frames(subs->runtime, count); | 338 | return bytes_to_frames(subs->runtime, count); |
339 | } | 339 | } |
340 | 340 | ||
@@ -486,7 +486,7 @@ static void snd_pmac_pcm_update(struct snd_pmac *chip, struct pmac_stream *rec) | |||
486 | if (! (stat & ACTIVE)) | 486 | if (! (stat & ACTIVE)) |
487 | break; | 487 | break; |
488 | 488 | ||
489 | /*printk("update frag %d\n", rec->cur_period);*/ | 489 | /*printk(KERN_DEBUG "update frag %d\n", rec->cur_period);*/ |
490 | st_le16(&cp->xfer_status, 0); | 490 | st_le16(&cp->xfer_status, 0); |
491 | st_le16(&cp->req_count, rec->period_size); | 491 | st_le16(&cp->req_count, rec->period_size); |
492 | /*st_le16(&cp->res_count, 0);*/ | 492 | /*st_le16(&cp->res_count, 0);*/ |
@@ -806,7 +806,7 @@ snd_pmac_ctrl_intr(int irq, void *devid) | |||
806 | struct snd_pmac *chip = devid; | 806 | struct snd_pmac *chip = devid; |
807 | int ctrl = in_le32(&chip->awacs->control); | 807 | int ctrl = in_le32(&chip->awacs->control); |
808 | 808 | ||
809 | /*printk("pmac: control interrupt.. 0x%x\n", ctrl);*/ | 809 | /*printk(KERN_DEBUG "pmac: control interrupt.. 0x%x\n", ctrl);*/ |
810 | if (ctrl & MASK_PORTCHG) { | 810 | if (ctrl & MASK_PORTCHG) { |
811 | /* do something when headphone is plugged/unplugged? */ | 811 | /* do something when headphone is plugged/unplugged? */ |
812 | if (chip->update_automute) | 812 | if (chip->update_automute) |
@@ -1033,7 +1033,8 @@ static int __init snd_pmac_detect(struct snd_pmac *chip) | |||
1033 | } | 1033 | } |
1034 | if (of_device_is_compatible(sound, "tumbler")) { | 1034 | if (of_device_is_compatible(sound, "tumbler")) { |
1035 | chip->model = PMAC_TUMBLER; | 1035 | chip->model = PMAC_TUMBLER; |
1036 | chip->can_capture = machine_is_compatible("PowerMac4,2"); | 1036 | chip->can_capture = machine_is_compatible("PowerMac4,2") |
1037 | || machine_is_compatible("PowerBook4,1"); | ||
1037 | chip->can_duplex = 0; | 1038 | chip->can_duplex = 0; |
1038 | // chip->can_byte_swap = 0; /* FIXME: check this */ | 1039 | // chip->can_byte_swap = 0; /* FIXME: check this */ |
1039 | chip->num_freqs = ARRAY_SIZE(tumbler_freqs); | 1040 | chip->num_freqs = ARRAY_SIZE(tumbler_freqs); |
diff --git a/sound/ppc/powermac.c b/sound/ppc/powermac.c index 2e18ed0ea89..5a929069dce 100644 --- a/sound/ppc/powermac.c +++ b/sound/ppc/powermac.c | |||
@@ -110,7 +110,7 @@ static int __init snd_pmac_probe(struct platform_device *devptr) | |||
110 | goto __error; | 110 | goto __error; |
111 | break; | 111 | break; |
112 | default: | 112 | default: |
113 | snd_printk("unsupported hardware %d\n", chip->model); | 113 | snd_printk(KERN_ERR "unsupported hardware %d\n", chip->model); |
114 | err = -EINVAL; | 114 | err = -EINVAL; |
115 | goto __error; | 115 | goto __error; |
116 | } | 116 | } |
diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c index 3eb22338541..40222fcc087 100644 --- a/sound/ppc/tumbler.c +++ b/sound/ppc/tumbler.c | |||
@@ -41,7 +41,7 @@ | |||
41 | #undef DEBUG | 41 | #undef DEBUG |
42 | 42 | ||
43 | #ifdef DEBUG | 43 | #ifdef DEBUG |
44 | #define DBG(fmt...) printk(fmt) | 44 | #define DBG(fmt...) printk(KERN_DEBUG fmt) |
45 | #else | 45 | #else |
46 | #define DBG(fmt...) | 46 | #define DBG(fmt...) |
47 | #endif | 47 | #endif |
@@ -240,7 +240,7 @@ static int tumbler_set_master_volume(struct pmac_tumbler *mix) | |||
240 | 240 | ||
241 | if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_VOL, 6, | 241 | if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_VOL, 6, |
242 | block) < 0) { | 242 | block) < 0) { |
243 | snd_printk("failed to set volume \n"); | 243 | snd_printk(KERN_ERR "failed to set volume \n"); |
244 | return -EINVAL; | 244 | return -EINVAL; |
245 | } | 245 | } |
246 | return 0; | 246 | return 0; |
@@ -350,7 +350,7 @@ static int tumbler_set_drc(struct pmac_tumbler *mix) | |||
350 | 350 | ||
351 | if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_DRC, | 351 | if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_DRC, |
352 | 2, val) < 0) { | 352 | 2, val) < 0) { |
353 | snd_printk("failed to set DRC\n"); | 353 | snd_printk(KERN_ERR "failed to set DRC\n"); |
354 | return -EINVAL; | 354 | return -EINVAL; |
355 | } | 355 | } |
356 | return 0; | 356 | return 0; |
@@ -386,7 +386,7 @@ static int snapper_set_drc(struct pmac_tumbler *mix) | |||
386 | 386 | ||
387 | if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_DRC, | 387 | if (i2c_smbus_write_i2c_block_data(mix->i2c.client, TAS_REG_DRC, |
388 | 6, val) < 0) { | 388 | 6, val) < 0) { |
389 | snd_printk("failed to set DRC\n"); | 389 | snd_printk(KERN_ERR "failed to set DRC\n"); |
390 | return -EINVAL; | 390 | return -EINVAL; |
391 | } | 391 | } |
392 | return 0; | 392 | return 0; |
@@ -506,7 +506,8 @@ static int tumbler_set_mono_volume(struct pmac_tumbler *mix, | |||
506 | block[i] = (vol >> ((info->bytes - i - 1) * 8)) & 0xff; | 506 | block[i] = (vol >> ((info->bytes - i - 1) * 8)) & 0xff; |
507 | if (i2c_smbus_write_i2c_block_data(mix->i2c.client, info->reg, | 507 | if (i2c_smbus_write_i2c_block_data(mix->i2c.client, info->reg, |
508 | info->bytes, block) < 0) { | 508 | info->bytes, block) < 0) { |
509 | snd_printk("failed to set mono volume %d\n", info->index); | 509 | snd_printk(KERN_ERR "failed to set mono volume %d\n", |
510 | info->index); | ||
510 | return -EINVAL; | 511 | return -EINVAL; |
511 | } | 512 | } |
512 | return 0; | 513 | return 0; |
@@ -643,7 +644,7 @@ static int snapper_set_mix_vol1(struct pmac_tumbler *mix, int idx, int ch, int r | |||
643 | } | 644 | } |
644 | if (i2c_smbus_write_i2c_block_data(mix->i2c.client, reg, | 645 | if (i2c_smbus_write_i2c_block_data(mix->i2c.client, reg, |
645 | 9, block) < 0) { | 646 | 9, block) < 0) { |
646 | snd_printk("failed to set mono volume %d\n", reg); | 647 | snd_printk(KERN_ERR "failed to set mono volume %d\n", reg); |
647 | return -EINVAL; | 648 | return -EINVAL; |
648 | } | 649 | } |
649 | return 0; | 650 | return 0; |