From 983e0972cea450fe5725d1ba11c78adfd5d7ad3a Mon Sep 17 00:00:00 2001 From: Johann Felix Soden Date: Fri, 2 May 2008 09:54:31 +0200 Subject: [ALSA] pcsp: Fix build with CONFIG_PM=n sound/drivers/pcsp/pcsp.c: In function 'pcsp_suspend': sound/drivers/pcsp/pcsp.c:201: error: implicit declaration of function 'snd_pcm_suspend_all' Signed-off-by: Johann Felix Soden CC: Stas Sergeev Signed-off-by: Takashi Iwai --- sound/drivers/pcsp/pcsp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c index 59203511e77d..54a1f9036c66 100644 --- a/sound/drivers/pcsp/pcsp.c +++ b/sound/drivers/pcsp/pcsp.c @@ -194,6 +194,7 @@ static void pcsp_stop_beep(struct snd_pcsp *chip) spin_unlock_irq(&chip->substream_lock); } +#ifdef CONFIG_PM static int pcsp_suspend(struct platform_device *dev, pm_message_t state) { struct snd_pcsp *chip = platform_get_drvdata(dev); @@ -201,6 +202,9 @@ static int pcsp_suspend(struct platform_device *dev, pm_message_t state) snd_pcm_suspend_all(chip->pcm); return 0; } +#else +#define pcsp_suspend NULL +#endif /* CONFIG_PM */ static void pcsp_shutdown(struct platform_device *dev) { -- cgit v1.2.1 From 7bd3c0f73c9c5b47fd1ca49757c436e73f4cd55b Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 2 May 2008 12:28:02 +0200 Subject: [ALSA] hda - Support IDT 92HD206 codec Added the support for IDT 92HD206 codec chip. It's compatible with STAC927x. Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_sigmatel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index b3a15d616873..393f7fd2b1be 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4289,6 +4289,8 @@ struct hda_codec_preset snd_hda_preset_sigmatel[] = { { .id = 0x83847635, .name = "STAC9250D", .patch = patch_stac925x }, { .id = 0x83847636, .name = "STAC9251", .patch = patch_stac925x }, { .id = 0x83847637, .name = "STAC9250D", .patch = patch_stac925x }, + { .id = 0x83847645, .name = "92HD206X", .patch = patch_stac927x }, + { .id = 0x83847646, .name = "92HD206D", .patch = patch_stac927x }, /* The following does not take into account .id=0x83847661 when subsys = * 104D0C00 which is STAC9225s. Because of this, some SZ Notebooks are * currently not fully supported. -- cgit v1.2.1 From 20686c24377246d9eb57782551b25ff19df09873 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 2 May 2008 12:31:51 +0200 Subject: [ALSA] fm801 - Fix kconfig dependency mess of fm801-tea575x FM801-tea575x tuner has a reverse selection to V4L1 and this causes nasty dependency problems. The patch simplifies the dependency with a normal "depends on VIDEO_V4L1". This decreases the usability but fixes bugs, yeah. If any better feature like "requires" is introduced to kbuild in future, we'll be able to switch it... Signed-off-by: Takashi Iwai --- sound/pci/Kconfig | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig index 581debf37dcb..7e4742109572 100644 --- a/sound/pci/Kconfig +++ b/sound/pci/Kconfig @@ -515,19 +515,16 @@ config SND_FM801 config SND_FM801_TEA575X_BOOL bool "ForteMedia FM801 + TEA5757 tuner" depends on SND_FM801 + depends on VIDEO_V4L1=y || VIDEO_V4L1=SND_FM801 help Say Y here to include support for soundcards based on the ForteMedia FM801 chip with a TEA5757 tuner connected to GPIO1-3 pins (Media Forte SF256-PCS-02) into the snd-fm801 driver. - This will enable support for the old V4L1 API. - config SND_FM801_TEA575X tristate depends on SND_FM801_TEA575X_BOOL default SND_FM801 - select VIDEO_V4L1 - select VIDEO_DEV config SND_HDA_INTEL tristate "Intel HD Audio" -- cgit v1.2.1 From 564c5bead424fa798dfbd5fe382b4e0b7ea483fb Mon Sep 17 00:00:00 2001 From: Jacek Luczak Date: Sat, 3 May 2008 18:41:23 +0200 Subject: [ALSA] Revert migration to alc_set_pin_output() in alc861_auto_set_output_and_unmute() Change done by: commit f6c7e5461e9046445d50c5c7a9a4587824239623 [ALSA] hda-codec - Fix auto-configuration of Realtek codecs broke sound on ALC861 Analog. Signed-off-by: Jacek Luczak Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index d9783a4263e0..6d4df45e81e0 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -11902,7 +11902,10 @@ static void alc861_auto_set_output_and_unmute(struct hda_codec *codec, hda_nid_t nid, int pin_type, int dac_idx) { - alc_set_pin_output(codec, nid, pin_type); + snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, + pin_type); + snd_hda_codec_write(codec, dac_idx, 0, AC_VERB_SET_AMP_GAIN_MUTE, + AMP_OUT_UNMUTE); } static void alc861_auto_init_multi_out(struct hda_codec *codec) -- cgit v1.2.1 From 2e75d050e42d1c61e820f9a35078a2f69e02cc3e Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sat, 3 May 2008 18:46:56 +0200 Subject: [ALSA] ac97 - Add a workaround for broken quirk for VT1617A codec On boards with VT1617A codec, the sound disappears suddenly. This looks like a problem with HPE-bit control that is supposed to be set in patch_vt1617a(). However, on such problematic hardwares, the bit is actually reset mysteriously. The patch adds a workaround for the wrong quirk. Signed-off-by: Takashi Iwai --- sound/pci/ac97/ac97_patch.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 39198e505b12..2da89810ca10 100644 --- a/sound/pci/ac97/ac97_patch.c +++ b/sound/pci/ac97/ac97_patch.c @@ -3446,6 +3446,7 @@ static const struct snd_kcontrol_new snd_ac97_controls_vt1617a[] = { int patch_vt1617a(struct snd_ac97 * ac97) { int err = 0; + int val; /* we choose to not fail out at this point, but we tell the caller when we return */ @@ -3456,7 +3457,13 @@ int patch_vt1617a(struct snd_ac97 * ac97) /* bring analog power consumption to normal by turning off the * headphone amplifier, like WinXP driver for EPIA SP */ - snd_ac97_write_cache(ac97, 0x5c, 0x20); + /* We need to check the bit before writing it. + * On some (many?) hardwares, setting bit actually clears it! + */ + val = snd_ac97_read(ac97, 0x5c); + if (!(val & 0x20)) + snd_ac97_write_cache(ac97, 0x5c, 0x20); + ac97->ext_id |= AC97_EI_SPDIF; /* force the detection of spdif */ ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000; ac97->build_ops = &patch_vt1616_ops; -- cgit v1.2.1 From d6426171bab3403cdcd5613d5549f20b0ab0967c Mon Sep 17 00:00:00 2001 From: Davide Rizzo Date: Mon, 5 May 2008 14:56:07 +0200 Subject: [ALSA] soc - fix s3c2410 PCM breakage S3C2410 pcm doesn't work. s3c2410_dma_request() now returns the channel number and not 0 if OK. Signed-off-by: Davide Rizzo Acked-by: Liam Girdwood Signed-off-by: Takashi Iwai --- sound/soc/s3c24xx/s3c24xx-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/s3c24xx/s3c24xx-pcm.c b/sound/soc/s3c24xx/s3c24xx-pcm.c index 6c70a81c730c..7806ae614617 100644 --- a/sound/soc/s3c24xx/s3c24xx-pcm.c +++ b/sound/soc/s3c24xx/s3c24xx-pcm.c @@ -171,7 +171,7 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream, ret = s3c2410_dma_request(prtd->params->channel, prtd->params->client, NULL); - if (ret) { + if (ret < 0) { DBG(KERN_ERR "failed to get dma channel\n"); return ret; } -- cgit v1.2.1 From 2c36eecfb6471c457994647771d1405502ad5fde Mon Sep 17 00:00:00 2001 From: Davide Rizzo Date: Mon, 5 May 2008 14:59:39 +0200 Subject: [ALSA] soc - fix S3C2410 i2s programming error S3C2410 i2s driver currently manages only i2s protocol (and not left justified one) and slave mode. With this small patch, other modes are possible. Signed-off-by: Davide Rizzo Acked-by: Liam Girdwood Signed-off-by: Takashi Iwai --- sound/soc/s3c24xx/s3c24xx-i2s.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c index 4ebcd6a8bf28..1ed6afd45459 100644 --- a/sound/soc/s3c24xx/s3c24xx-i2s.c +++ b/sound/soc/s3c24xx/s3c24xx-i2s.c @@ -224,6 +224,7 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_cpu_dai *cpu_dai, iismod |= S3C2410_IISMOD_SLAVE; break; case SND_SOC_DAIFMT_CBS_CFS: + iismod &= ~S3C2410_IISMOD_SLAVE; break; default: return -EINVAL; @@ -234,6 +235,7 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_cpu_dai *cpu_dai, iismod |= S3C2410_IISMOD_MSB; break; case SND_SOC_DAIFMT_I2S: + iismod &= ~S3C2410_IISMOD_MSB; break; default: return -EINVAL; -- cgit v1.2.1