diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-22 15:54:53 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-22 16:01:40 -0400 |
commit | ae19ffbadc1b2100285a5b5b3d0a4e0a11390904 (patch) | |
tree | 3c2086ab67398a019089a47ca3f362a4bc6db74f /sound | |
parent | 34e84f39a27d059a3e6ec6e8b94aafa702e6f220 (diff) | |
parent | 9173a8ef24a6b1b8031507b35b8ffe5f85a87692 (diff) |
Merge branch 'master' into for-linus
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 21 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 65 | ||||
-rw-r--r-- | sound/soc/codecs/ad1836.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/ad1938.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/wm8974.c | 1 | ||||
-rw-r--r-- | sound/soc/fsl/mpc5200_dma.c | 33 | ||||
-rw-r--r-- | sound/soc/s3c24xx/s3c-i2s-v2.c | 16 | ||||
-rw-r--r-- | sound/soc/soc-dapm.c | 7 |
8 files changed, 85 insertions, 60 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 7ed47f66ddd1..129605819560 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -7927,8 +7927,9 @@ static struct snd_kcontrol_new alc883_fivestack_mixer[] = { | |||
7927 | 7927 | ||
7928 | static struct snd_kcontrol_new alc883_targa_mixer[] = { | 7928 | static struct snd_kcontrol_new alc883_targa_mixer[] = { |
7929 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | 7929 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), |
7930 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
7930 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT), | 7931 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT), |
7931 | HDA_CODEC_MUTE("Front Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | 7932 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x1b, 0x0, HDA_OUTPUT), |
7932 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), | 7933 | HDA_CODEC_VOLUME("Surround Playback Volume", 0x0d, 0x0, HDA_OUTPUT), |
7933 | HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), | 7934 | HDA_BIND_MUTE("Surround Playback Switch", 0x0d, 2, HDA_INPUT), |
7934 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), | 7935 | HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT), |
@@ -7947,8 +7948,9 @@ static struct snd_kcontrol_new alc883_targa_mixer[] = { | |||
7947 | 7948 | ||
7948 | static struct snd_kcontrol_new alc883_targa_2ch_mixer[] = { | 7949 | static struct snd_kcontrol_new alc883_targa_2ch_mixer[] = { |
7949 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | 7950 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), |
7951 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | ||
7950 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT), | 7952 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT), |
7951 | HDA_CODEC_MUTE("Front Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | 7953 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x1b, 0x0, HDA_OUTPUT), |
7952 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), | 7954 | HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT), |
7953 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), | 7955 | HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT), |
7954 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), | 7956 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT), |
@@ -7960,6 +7962,15 @@ static struct snd_kcontrol_new alc883_targa_2ch_mixer[] = { | |||
7960 | { } /* end */ | 7962 | { } /* end */ |
7961 | }; | 7963 | }; |
7962 | 7964 | ||
7965 | static struct snd_kcontrol_new alc883_targa_8ch_mixer[] = { | ||
7966 | HDA_CODEC_VOLUME("Side Playback Volume", 0x0f, 0x0, HDA_OUTPUT), | ||
7967 | HDA_BIND_MUTE("Side Playback Switch", 0x0f, 2, HDA_INPUT), | ||
7968 | HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT), | ||
7969 | HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), | ||
7970 | HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT), | ||
7971 | { } /* end */ | ||
7972 | }; | ||
7973 | |||
7963 | static struct snd_kcontrol_new alc883_lenovo_101e_2ch_mixer[] = { | 7974 | static struct snd_kcontrol_new alc883_lenovo_101e_2ch_mixer[] = { |
7964 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), | 7975 | HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT), |
7965 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), | 7976 | HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT), |
@@ -9167,7 +9178,8 @@ static struct alc_config_preset alc882_presets[] = { | |||
9167 | .init_hook = alc882_targa_automute, | 9178 | .init_hook = alc882_targa_automute, |
9168 | }, | 9179 | }, |
9169 | [ALC883_TARGA_8ch_DIG] = { | 9180 | [ALC883_TARGA_8ch_DIG] = { |
9170 | .mixers = { alc883_base_mixer, alc883_chmode_mixer }, | 9181 | .mixers = { alc883_targa_mixer, alc883_targa_8ch_mixer, |
9182 | alc883_chmode_mixer }, | ||
9171 | .init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs, | 9183 | .init_verbs = { alc883_init_verbs, alc880_gpio3_init_verbs, |
9172 | alc883_targa_verbs }, | 9184 | alc883_targa_verbs }, |
9173 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), | 9185 | .num_dacs = ARRAY_SIZE(alc883_dac_nids), |
@@ -13370,7 +13382,8 @@ static const char *alc269_models[ALC269_MODEL_LAST] = { | |||
13370 | [ALC269_ASUS_EEEPC_P703] = "eeepc-p703", | 13382 | [ALC269_ASUS_EEEPC_P703] = "eeepc-p703", |
13371 | [ALC269_ASUS_EEEPC_P901] = "eeepc-p901", | 13383 | [ALC269_ASUS_EEEPC_P901] = "eeepc-p901", |
13372 | [ALC269_FUJITSU] = "fujitsu", | 13384 | [ALC269_FUJITSU] = "fujitsu", |
13373 | [ALC269_LIFEBOOK] = "lifebook" | 13385 | [ALC269_LIFEBOOK] = "lifebook", |
13386 | [ALC269_AUTO] = "auto", | ||
13374 | }; | 13387 | }; |
13375 | 13388 | ||
13376 | static struct snd_pci_quirk alc269_cfg_tbl[] = { | 13389 | static struct snd_pci_quirk alc269_cfg_tbl[] = { |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index e31e53dc6962..826137ec3002 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -864,10 +864,6 @@ static struct hda_verb stac92hd73xx_core_init[] = { | |||
864 | }; | 864 | }; |
865 | 865 | ||
866 | static struct hda_verb stac92hd83xxx_core_init[] = { | 866 | static struct hda_verb stac92hd83xxx_core_init[] = { |
867 | { 0xa, AC_VERB_SET_CONNECT_SEL, 0x1}, | ||
868 | { 0xb, AC_VERB_SET_CONNECT_SEL, 0x1}, | ||
869 | { 0xd, AC_VERB_SET_CONNECT_SEL, 0x0}, | ||
870 | |||
871 | /* power state controls amps */ | 867 | /* power state controls amps */ |
872 | { 0x01, AC_VERB_SET_EAPD, 1 << 2}, | 868 | { 0x01, AC_VERB_SET_EAPD, 1 << 2}, |
873 | {} | 869 | {} |
@@ -1590,8 +1586,8 @@ static unsigned int ref92hd83xxx_pin_configs[10] = { | |||
1590 | }; | 1586 | }; |
1591 | 1587 | ||
1592 | static unsigned int dell_s14_pin_configs[10] = { | 1588 | static unsigned int dell_s14_pin_configs[10] = { |
1593 | 0x02214030, 0x02211010, 0x02a19020, 0x01014050, | 1589 | 0x0221403f, 0x0221101f, 0x02a19020, 0x90170110, |
1594 | 0x40f000f0, 0x01819040, 0x40f000f0, 0x90a60160, | 1590 | 0x40f000f0, 0x40f000f0, 0x40f000f0, 0x90a60160, |
1595 | 0x40f000f0, 0x40f000f0, | 1591 | 0x40f000f0, 0x40f000f0, |
1596 | }; | 1592 | }; |
1597 | 1593 | ||
@@ -1690,6 +1686,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { | |||
1690 | "HP mini 1000", STAC_HP_M4), | 1686 | "HP mini 1000", STAC_HP_M4), |
1691 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361b, | 1687 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x361b, |
1692 | "HP HDX", STAC_HP_HDX), /* HDX16 */ | 1688 | "HP HDX", STAC_HP_HDX), /* HDX16 */ |
1689 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3620, | ||
1690 | "HP dv6", STAC_HP_DV5), | ||
1693 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010, | 1691 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010, |
1694 | "HP", STAC_HP_DV5), | 1692 | "HP", STAC_HP_DV5), |
1695 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, | 1693 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, |
@@ -4166,7 +4164,10 @@ static int stac92xx_init(struct hda_codec *codec) | |||
4166 | stac92xx_auto_set_pinctl(codec, spec->autocfg.line_out_pins[0], | 4164 | stac92xx_auto_set_pinctl(codec, spec->autocfg.line_out_pins[0], |
4167 | AC_PINCTL_OUT_EN); | 4165 | AC_PINCTL_OUT_EN); |
4168 | /* fake event to set up pins */ | 4166 | /* fake event to set up pins */ |
4169 | stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]); | 4167 | if (cfg->hp_pins[0]) |
4168 | stac_issue_unsol_event(codec, cfg->hp_pins[0]); | ||
4169 | else if (cfg->line_out_pins[0]) | ||
4170 | stac_issue_unsol_event(codec, cfg->line_out_pins[0]); | ||
4170 | } else { | 4171 | } else { |
4171 | stac92xx_auto_init_multi_out(codec); | 4172 | stac92xx_auto_init_multi_out(codec); |
4172 | stac92xx_auto_init_hp_out(codec); | 4173 | stac92xx_auto_init_hp_out(codec); |
@@ -4688,8 +4689,13 @@ static int stac92xx_resume(struct hda_codec *codec) | |||
4688 | snd_hda_codec_resume_amp(codec); | 4689 | snd_hda_codec_resume_amp(codec); |
4689 | snd_hda_codec_resume_cache(codec); | 4690 | snd_hda_codec_resume_cache(codec); |
4690 | /* fake event to set up pins again to override cached values */ | 4691 | /* fake event to set up pins again to override cached values */ |
4691 | if (spec->hp_detect) | 4692 | if (spec->hp_detect) { |
4692 | stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]); | 4693 | if (spec->autocfg.hp_pins[0]) |
4694 | stac_issue_unsol_event(codec, spec->autocfg.hp_pins[0]); | ||
4695 | else if (spec->autocfg.line_out_pins[0]) | ||
4696 | stac_issue_unsol_event(codec, | ||
4697 | spec->autocfg.line_out_pins[0]); | ||
4698 | } | ||
4693 | return 0; | 4699 | return 0; |
4694 | } | 4700 | } |
4695 | 4701 | ||
@@ -5016,7 +5022,7 @@ again: | |||
5016 | spec->eapd_switch = 1; | 5022 | spec->eapd_switch = 1; |
5017 | break; | 5023 | break; |
5018 | } | 5024 | } |
5019 | if (spec->board_config > STAC_92HD73XX_REF) { | 5025 | if (spec->board_config != STAC_92HD73XX_REF) { |
5020 | /* GPIO0 High = Enable EAPD */ | 5026 | /* GPIO0 High = Enable EAPD */ |
5021 | spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1; | 5027 | spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x1; |
5022 | spec->gpio_data = 0x01; | 5028 | spec->gpio_data = 0x01; |
@@ -5066,7 +5072,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) | |||
5066 | 5072 | ||
5067 | codec->spec = spec; | 5073 | codec->spec = spec; |
5068 | codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs; | 5074 | codec->slave_dig_outs = stac92hd83xxx_slave_dig_outs; |
5069 | spec->mono_nid = 0x19; | ||
5070 | spec->digbeep_nid = 0x21; | 5075 | spec->digbeep_nid = 0x21; |
5071 | spec->mux_nids = stac92hd83xxx_mux_nids; | 5076 | spec->mux_nids = stac92hd83xxx_mux_nids; |
5072 | spec->num_muxes = ARRAY_SIZE(stac92hd83xxx_mux_nids); | 5077 | spec->num_muxes = ARRAY_SIZE(stac92hd83xxx_mux_nids); |
@@ -5242,7 +5247,7 @@ again: | |||
5242 | stac92xx_set_config_regs(codec, | 5247 | stac92xx_set_config_regs(codec, |
5243 | stac92hd71bxx_brd_tbl[spec->board_config]); | 5248 | stac92hd71bxx_brd_tbl[spec->board_config]); |
5244 | 5249 | ||
5245 | if (spec->board_config > STAC_92HD71BXX_REF) { | 5250 | if (spec->board_config != STAC_92HD71BXX_REF) { |
5246 | /* GPIO0 = EAPD */ | 5251 | /* GPIO0 = EAPD */ |
5247 | spec->gpio_mask = 0x01; | 5252 | spec->gpio_mask = 0x01; |
5248 | spec->gpio_dir = 0x01; | 5253 | spec->gpio_dir = 0x01; |
@@ -5375,6 +5380,11 @@ again: | |||
5375 | case STAC_HP_DV5: | 5380 | case STAC_HP_DV5: |
5376 | snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010); | 5381 | snd_hda_codec_set_pincfg(codec, 0x0d, 0x90170010); |
5377 | stac92xx_auto_set_pinctl(codec, 0x0d, AC_PINCTL_OUT_EN); | 5382 | stac92xx_auto_set_pinctl(codec, 0x0d, AC_PINCTL_OUT_EN); |
5383 | /* HP dv6 gives the headphone pin as a line-out. Thus we | ||
5384 | * need to set hp_detect flag here to force to enable HP | ||
5385 | * detection. | ||
5386 | */ | ||
5387 | spec->hp_detect = 1; | ||
5378 | break; | 5388 | break; |
5379 | case STAC_HP_HDX: | 5389 | case STAC_HP_HDX: |
5380 | spec->num_dmics = 1; | 5390 | spec->num_dmics = 1; |
@@ -5557,14 +5567,17 @@ static int patch_stac927x(struct hda_codec *codec) | |||
5557 | spec->dac_list = stac927x_dac_nids; | 5567 | spec->dac_list = stac927x_dac_nids; |
5558 | spec->multiout.dac_nids = spec->dac_nids; | 5568 | spec->multiout.dac_nids = spec->dac_nids; |
5559 | 5569 | ||
5570 | if (spec->board_config != STAC_D965_REF) { | ||
5571 | /* GPIO0 High = Enable EAPD */ | ||
5572 | spec->eapd_mask = spec->gpio_mask = 0x01; | ||
5573 | spec->gpio_dir = spec->gpio_data = 0x01; | ||
5574 | } | ||
5575 | |||
5560 | switch (spec->board_config) { | 5576 | switch (spec->board_config) { |
5561 | case STAC_D965_3ST: | 5577 | case STAC_D965_3ST: |
5562 | case STAC_D965_5ST: | 5578 | case STAC_D965_5ST: |
5563 | /* GPIO0 High = Enable EAPD */ | 5579 | /* GPIO0 High = Enable EAPD */ |
5564 | spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x01; | ||
5565 | spec->gpio_data = 0x01; | ||
5566 | spec->num_dmics = 0; | 5580 | spec->num_dmics = 0; |
5567 | |||
5568 | spec->init = d965_core_init; | 5581 | spec->init = d965_core_init; |
5569 | break; | 5582 | break; |
5570 | case STAC_DELL_BIOS: | 5583 | case STAC_DELL_BIOS: |
@@ -5583,16 +5596,11 @@ static int patch_stac927x(struct hda_codec *codec) | |||
5583 | snd_hda_codec_set_pincfg(codec, 0x0e, 0x02a79130); | 5596 | snd_hda_codec_set_pincfg(codec, 0x0e, 0x02a79130); |
5584 | /* fallthru */ | 5597 | /* fallthru */ |
5585 | case STAC_DELL_3ST: | 5598 | case STAC_DELL_3ST: |
5586 | /* GPIO2 High = Enable EAPD */ | 5599 | if (codec->subsystem_id != 0x1028022f) { |
5587 | spec->eapd_mask = spec->gpio_mask = spec->gpio_dir = 0x04; | 5600 | /* GPIO2 High = Enable EAPD */ |
5588 | spec->gpio_data = 0x04; | 5601 | spec->eapd_mask = spec->gpio_mask = 0x04; |
5589 | switch (codec->subsystem_id) { | 5602 | spec->gpio_dir = spec->gpio_data = 0x04; |
5590 | case 0x1028022f: | 5603 | } |
5591 | /* correct EAPD to be GPIO0 */ | ||
5592 | spec->eapd_mask = spec->gpio_mask = 0x01; | ||
5593 | spec->gpio_dir = spec->gpio_data = 0x01; | ||
5594 | break; | ||
5595 | }; | ||
5596 | spec->dmic_nids = stac927x_dmic_nids; | 5604 | spec->dmic_nids = stac927x_dmic_nids; |
5597 | spec->num_dmics = STAC927X_NUM_DMICS; | 5605 | spec->num_dmics = STAC927X_NUM_DMICS; |
5598 | 5606 | ||
@@ -5601,14 +5609,9 @@ static int patch_stac927x(struct hda_codec *codec) | |||
5601 | spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids); | 5609 | spec->num_dmuxes = ARRAY_SIZE(stac927x_dmux_nids); |
5602 | break; | 5610 | break; |
5603 | default: | 5611 | default: |
5604 | if (spec->board_config > STAC_D965_REF) { | ||
5605 | /* GPIO0 High = Enable EAPD */ | ||
5606 | spec->eapd_mask = spec->gpio_mask = 0x01; | ||
5607 | spec->gpio_dir = spec->gpio_data = 0x01; | ||
5608 | } | ||
5609 | spec->num_dmics = 0; | 5612 | spec->num_dmics = 0; |
5610 | |||
5611 | spec->init = stac927x_core_init; | 5613 | spec->init = stac927x_core_init; |
5614 | break; | ||
5612 | } | 5615 | } |
5613 | 5616 | ||
5614 | spec->num_caps = STAC927X_NUM_CAPS; | 5617 | spec->num_caps = STAC927X_NUM_CAPS; |
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c index 3612bb92df90..01343dc984fd 100644 --- a/sound/soc/codecs/ad1836.c +++ b/sound/soc/codecs/ad1836.c | |||
@@ -18,7 +18,6 @@ | |||
18 | 18 | ||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/version.h> | ||
22 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
23 | #include <linux/device.h> | 22 | #include <linux/device.h> |
24 | #include <sound/core.h> | 23 | #include <sound/core.h> |
diff --git a/sound/soc/codecs/ad1938.c b/sound/soc/codecs/ad1938.c index e62b27701a49..9a049a1995a3 100644 --- a/sound/soc/codecs/ad1938.c +++ b/sound/soc/codecs/ad1938.c | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/version.h> | ||
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/device.h> | 32 | #include <linux/device.h> |
34 | #include <sound/core.h> | 33 | #include <sound/core.h> |
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index d8a013ab3177..98d663afc97d 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c | |||
@@ -12,7 +12,6 @@ | |||
12 | 12 | ||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
15 | #include <linux/version.h> | ||
16 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
17 | #include <linux/init.h> | 16 | #include <linux/init.h> |
18 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c index 9ff62e3a9b1d..6096d22283e6 100644 --- a/sound/soc/fsl/mpc5200_dma.c +++ b/sound/soc/fsl/mpc5200_dma.c | |||
@@ -447,6 +447,7 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
447 | int size, irq, rc; | 447 | int size, irq, rc; |
448 | const __be32 *prop; | 448 | const __be32 *prop; |
449 | void __iomem *regs; | 449 | void __iomem *regs; |
450 | int ret; | ||
450 | 451 | ||
451 | /* Fetch the registers and IRQ of the PSC */ | 452 | /* Fetch the registers and IRQ of the PSC */ |
452 | irq = irq_of_parse_and_map(op->node, 0); | 453 | irq = irq_of_parse_and_map(op->node, 0); |
@@ -463,14 +464,16 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
463 | /* Allocate and initialize the driver private data */ | 464 | /* Allocate and initialize the driver private data */ |
464 | psc_dma = kzalloc(sizeof *psc_dma, GFP_KERNEL); | 465 | psc_dma = kzalloc(sizeof *psc_dma, GFP_KERNEL); |
465 | if (!psc_dma) { | 466 | if (!psc_dma) { |
466 | iounmap(regs); | 467 | ret = -ENOMEM; |
467 | return -ENOMEM; | 468 | goto out_unmap; |
468 | } | 469 | } |
469 | 470 | ||
470 | /* Get the PSC ID */ | 471 | /* Get the PSC ID */ |
471 | prop = of_get_property(op->node, "cell-index", &size); | 472 | prop = of_get_property(op->node, "cell-index", &size); |
472 | if (!prop || size < sizeof *prop) | 473 | if (!prop || size < sizeof *prop) { |
473 | return -ENODEV; | 474 | ret = -ENODEV; |
475 | goto out_free; | ||
476 | } | ||
474 | 477 | ||
475 | spin_lock_init(&psc_dma->lock); | 478 | spin_lock_init(&psc_dma->lock); |
476 | mutex_init(&psc_dma->mutex); | 479 | mutex_init(&psc_dma->mutex); |
@@ -493,9 +496,8 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
493 | if (!psc_dma->capture.bcom_task || | 496 | if (!psc_dma->capture.bcom_task || |
494 | !psc_dma->playback.bcom_task) { | 497 | !psc_dma->playback.bcom_task) { |
495 | dev_err(&op->dev, "Could not allocate bestcomm tasks\n"); | 498 | dev_err(&op->dev, "Could not allocate bestcomm tasks\n"); |
496 | iounmap(regs); | 499 | ret = -ENODEV; |
497 | kfree(psc_dma); | 500 | goto out_free; |
498 | return -ENODEV; | ||
499 | } | 501 | } |
500 | 502 | ||
501 | /* Disable all interrupts and reset the PSC */ | 503 | /* Disable all interrupts and reset the PSC */ |
@@ -537,12 +539,8 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
537 | &psc_dma_bcom_irq_tx, IRQF_SHARED, | 539 | &psc_dma_bcom_irq_tx, IRQF_SHARED, |
538 | "psc-dma-playback", &psc_dma->playback); | 540 | "psc-dma-playback", &psc_dma->playback); |
539 | if (rc) { | 541 | if (rc) { |
540 | free_irq(psc_dma->irq, psc_dma); | 542 | ret = -ENODEV; |
541 | free_irq(psc_dma->capture.irq, | 543 | goto out_irq; |
542 | &psc_dma->capture); | ||
543 | free_irq(psc_dma->playback.irq, | ||
544 | &psc_dma->playback); | ||
545 | return -ENODEV; | ||
546 | } | 544 | } |
547 | 545 | ||
548 | /* Save what we've done so it can be found again later */ | 546 | /* Save what we've done so it can be found again later */ |
@@ -550,6 +548,15 @@ int mpc5200_audio_dma_create(struct of_device *op) | |||
550 | 548 | ||
551 | /* Tell the ASoC OF helpers about it */ | 549 | /* Tell the ASoC OF helpers about it */ |
552 | return snd_soc_register_platform(&mpc5200_audio_dma_platform); | 550 | return snd_soc_register_platform(&mpc5200_audio_dma_platform); |
551 | out_irq: | ||
552 | free_irq(psc_dma->irq, psc_dma); | ||
553 | free_irq(psc_dma->capture.irq, &psc_dma->capture); | ||
554 | free_irq(psc_dma->playback.irq, &psc_dma->playback); | ||
555 | out_free: | ||
556 | kfree(psc_dma); | ||
557 | out_unmap: | ||
558 | iounmap(regs); | ||
559 | return ret; | ||
553 | } | 560 | } |
554 | EXPORT_SYMBOL_GPL(mpc5200_audio_dma_create); | 561 | EXPORT_SYMBOL_GPL(mpc5200_audio_dma_create); |
555 | 562 | ||
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.c b/sound/soc/s3c24xx/s3c-i2s-v2.c index aa7af0b8d421..9bc4aa35caab 100644 --- a/sound/soc/s3c24xx/s3c-i2s-v2.c +++ b/sound/soc/s3c24xx/s3c-i2s-v2.c | |||
@@ -230,6 +230,8 @@ static void s3c2412_snd_rxctrl(struct s3c_i2sv2_info *i2s, int on) | |||
230 | pr_debug("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic); | 230 | pr_debug("%s: IIS: CON=%x MOD=%x FIC=%x\n", __func__, con, mod, fic); |
231 | } | 231 | } |
232 | 232 | ||
233 | #define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) | ||
234 | |||
233 | /* | 235 | /* |
234 | * Wait for the LR signal to allow synchronisation to the L/R clock | 236 | * Wait for the LR signal to allow synchronisation to the L/R clock |
235 | * from the codec. May only be needed for slave mode. | 237 | * from the codec. May only be needed for slave mode. |
@@ -237,19 +239,21 @@ static void s3c2412_snd_rxctrl(struct s3c_i2sv2_info *i2s, int on) | |||
237 | static int s3c2412_snd_lrsync(struct s3c_i2sv2_info *i2s) | 239 | static int s3c2412_snd_lrsync(struct s3c_i2sv2_info *i2s) |
238 | { | 240 | { |
239 | u32 iiscon; | 241 | u32 iiscon; |
240 | unsigned long timeout = jiffies + msecs_to_jiffies(5); | 242 | unsigned long loops = msecs_to_loops(5); |
241 | 243 | ||
242 | pr_debug("Entered %s\n", __func__); | 244 | pr_debug("Entered %s\n", __func__); |
243 | 245 | ||
244 | while (1) { | 246 | while (--loops) { |
245 | iiscon = readl(i2s->regs + S3C2412_IISCON); | 247 | iiscon = readl(i2s->regs + S3C2412_IISCON); |
246 | if (iiscon & S3C2412_IISCON_LRINDEX) | 248 | if (iiscon & S3C2412_IISCON_LRINDEX) |
247 | break; | 249 | break; |
248 | 250 | ||
249 | if (timeout < jiffies) { | 251 | cpu_relax(); |
250 | printk(KERN_ERR "%s: timeout\n", __func__); | 252 | } |
251 | return -ETIMEDOUT; | 253 | |
252 | } | 254 | if (!loops) { |
255 | printk(KERN_ERR "%s: timeout\n", __func__); | ||
256 | return -ETIMEDOUT; | ||
253 | } | 257 | } |
254 | 258 | ||
255 | return 0; | 259 | return 0; |
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 0d8b08ef8731..f79711b9fa5b 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -1131,9 +1131,10 @@ static ssize_t dapm_widget_power_read_file(struct file *file, | |||
1131 | ret = snprintf(buf, PAGE_SIZE, "%s: %s in %d out %d\n", | 1131 | ret = snprintf(buf, PAGE_SIZE, "%s: %s in %d out %d\n", |
1132 | w->name, w->power ? "On" : "Off", in, out); | 1132 | w->name, w->power ? "On" : "Off", in, out); |
1133 | 1133 | ||
1134 | if (w->active && w->sname) | 1134 | if (w->sname) |
1135 | ret += snprintf(buf, PAGE_SIZE - ret, " stream %s active\n", | 1135 | ret += snprintf(buf + ret, PAGE_SIZE - ret, " stream %s %s\n", |
1136 | w->sname); | 1136 | w->sname, |
1137 | w->active ? "active" : "inactive"); | ||
1137 | 1138 | ||
1138 | list_for_each_entry(p, &w->sources, list_sink) { | 1139 | list_for_each_entry(p, &w->sources, list_sink) { |
1139 | if (p->connect) | 1140 | if (p->connect) |