mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [GIT PULL] ALSA fixes for 2.6.27-rc4
@ 2008-08-25 17:01 Takashi Iwai
  2008-08-25 21:20 ` Tony Luck
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2008-08-25 17:01 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, linux-kernel

Linus,

please pull ALSA updates for 2.6.27-rc4 from:

  git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git for-linus

containing the following two fixes.

Thanks!

Takashi

===

Jean Delvare (1):
      ALSA: ASoC: Fix double free and memory leak in many codec drivers

Travis Place (1):
      ALSA: CA0106 on MSI K8N Diamond PLUS Motherboard


 sound/pci/ca0106/ca0106_main.c |    5 +++--
 sound/soc/codecs/ak4535.c      |   11 +++++++----
 sound/soc/codecs/tlv320aic3x.c |   11 +++++++----
 sound/soc/codecs/uda1380.c     |    9 +++++----
 sound/soc/codecs/wm8510.c      |    9 +++++----
 sound/soc/codecs/wm8731.c      |   11 +++++++----
 sound/soc/codecs/wm8750.c      |   10 ++++++----
 sound/soc/codecs/wm8753.c      |   11 +++++++----
 sound/soc/codecs/wm8990.c      |   11 +++++++----
 9 files changed, 54 insertions(+), 34 deletions(-)

diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index 2f8b28a..03a274b 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -249,11 +249,12 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
 	   .name   = "MSI K8N Diamond MB [SB0438]",
 	   .gpio_type = 2,
 	   .i2c_adc = 1 } ,
-	 /* Another MSI K8N Diamond MB, which has apprently a different SSID */
+	 /* MSI K8N Diamond PLUS MB */
 	 { .serial = 0x10091102,
 	   .name   = "MSI K8N Diamond MB",
 	   .gpio_type = 2,
-	   .i2c_adc = 1 } ,
+	   .i2c_adc = 1,
+	   .spi_dac = 2 }
 	 /* Shuttle XPC SD31P which has an onboard Creative Labs
 	  * Sound Blaster Live! 24-bit EAX
 	  * high-definition 7.1 audio processor".
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c
index b26003c..7da9f46 100644
--- a/sound/soc/codecs/ak4535.c
+++ b/sound/soc/codecs/ak4535.c
@@ -562,10 +562,9 @@ static int ak4535_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	client_template.addr = addr;
 
 	i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
-	if (i2c == NULL) {
-		kfree(codec);
+	if (i2c == NULL)
 		return -ENOMEM;
-	}
+
 	i2c_set_clientdata(i2c, codec);
 	codec->control_data = i2c;
 
@@ -583,7 +582,6 @@ static int ak4535_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	return ret;
 
 err:
-	kfree(codec);
 	kfree(i2c);
 	return ret;
 }
@@ -660,6 +658,11 @@ static int ak4535_probe(struct platform_device *pdev)
 #else
 	/* Add other interfaces here */
 #endif
+
+	if (ret != 0) {
+		kfree(codec->private_data);
+		kfree(codec);
+	}
 	return ret;
 }
 
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index b1dce5f..5f9abb1 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1199,10 +1199,9 @@ static int aic3x_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	client_template.addr = addr;
 
 	i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
-	if (i2c == NULL) {
-		kfree(codec);
+	if (i2c == NULL)
 		return -ENOMEM;
-	}
+
 	i2c_set_clientdata(i2c, codec);
 	codec->control_data = i2c;
 
@@ -1221,7 +1220,6 @@ static int aic3x_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	return ret;
 
 err:
-	kfree(codec);
 	kfree(i2c);
 	return ret;
 }
@@ -1302,6 +1300,11 @@ static int aic3x_probe(struct platform_device *pdev)
 #else
 	/* Add other interfaces here */
 #endif
+
+	if (ret != 0) {
+		kfree(codec->private_data);
+		kfree(codec);
+	}
 	return ret;
 }
 
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index a52d6d9..807318f 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -729,10 +729,9 @@ static int uda1380_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	client_template.addr = addr;
 
 	i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
-	if (i2c == NULL) {
-		kfree(codec);
+	if (i2c == NULL)
 		return -ENOMEM;
-	}
+
 	i2c_set_clientdata(i2c, codec);
 	codec->control_data = i2c;
 
@@ -750,7 +749,6 @@ static int uda1380_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	return ret;
 
 err:
-	kfree(codec);
 	kfree(i2c);
 	return ret;
 }
@@ -817,6 +815,9 @@ static int uda1380_probe(struct platform_device *pdev)
 #else
 	/* Add other interfaces here */
 #endif
+
+	if (ret != 0)
+		kfree(codec);
 	return ret;
 }
 
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
index 67325fd..3d998e6 100644
--- a/sound/soc/codecs/wm8510.c
+++ b/sound/soc/codecs/wm8510.c
@@ -693,10 +693,9 @@ static int wm8510_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	client_template.addr = addr;
 
 	i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
-	if (i2c == NULL) {
-		kfree(codec);
+	if (i2c == NULL)
 		return -ENOMEM;
-	}
+
 	i2c_set_clientdata(i2c, codec);
 	codec->control_data = i2c;
 
@@ -714,7 +713,6 @@ static int wm8510_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	return ret;
 
 err:
-	kfree(codec);
 	kfree(i2c);
 	return ret;
 }
@@ -782,6 +780,9 @@ static int wm8510_probe(struct platform_device *pdev)
 #else
 	/* Add other interfaces here */
 #endif
+
+	if (ret != 0)
+		kfree(codec);
 	return ret;
 }
 
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 369d39c..9402fca 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -596,10 +596,9 @@ static int wm8731_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	client_template.addr = addr;
 
 	i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
-	if (i2c == NULL) {
-		kfree(codec);
+	if (i2c == NULL)
 		return -ENOMEM;
-	}
+
 	i2c_set_clientdata(i2c, codec);
 	codec->control_data = i2c;
 
@@ -617,7 +616,6 @@ static int wm8731_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	return ret;
 
 err:
-	kfree(codec);
 	kfree(i2c);
 	return ret;
 }
@@ -693,6 +691,11 @@ static int wm8731_probe(struct platform_device *pdev)
 #else
 	/* Add other interfaces here */
 #endif
+
+	if (ret != 0) {
+		kfree(codec->private_data);
+		kfree(codec);
+	}
 	return ret;
 }
 
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index c6a8edf..dd1f554 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -869,10 +869,9 @@ static int wm8750_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	client_template.addr = addr;
 
 	i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
-	if (i2c == NULL) {
-		kfree(codec);
+	if (i2c == NULL)
 		return -ENOMEM;
-	}
+
 	i2c_set_clientdata(i2c, codec);
 	codec->control_data = i2c;
 
@@ -890,7 +889,6 @@ static int wm8750_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	return ret;
 
 err:
-	kfree(codec);
 	kfree(i2c);
 	return ret;
 }
@@ -966,6 +964,10 @@ static int wm8750_probe(struct platform_device *pdev)
 		/* Add other interfaces here */
 #endif
 
+	if (ret != 0) {
+		kfree(codec->private_data);
+		kfree(codec);
+	}
 	return ret;
 }
 
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index dc7b18f..5761164 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1660,10 +1660,9 @@ static int wm8753_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	client_template.addr = addr;
 
 	i2c =  kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
-	if (!i2c) {
-		kfree(codec);
+	if (!i2c)
 		return -ENOMEM;
-	}
+
 	i2c_set_clientdata(i2c, codec);
 	codec->control_data = i2c;
 
@@ -1682,7 +1681,6 @@ static int wm8753_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	return ret;
 
 err:
-	kfree(codec);
 	kfree(i2c);
 	return ret;
 }
@@ -1759,6 +1757,11 @@ static int wm8753_probe(struct platform_device *pdev)
 #else
 		/* Add other interfaces here */
 #endif
+
+	if (ret != 0) {
+		kfree(codec->private_data);
+		kfree(codec);
+	}
 	return ret;
 }
 
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index e44153f..dd995ef 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -1500,10 +1500,9 @@ static int wm8990_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	client_template.addr = addr;
 
 	i2c =  kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
-	if (i2c == NULL) {
-		kfree(codec);
+	if (i2c == NULL)
 		return -ENOMEM;
-	}
+
 	i2c_set_clientdata(i2c, codec);
 	codec->control_data = i2c;
 
@@ -1521,7 +1520,6 @@ static int wm8990_codec_probe(struct i2c_adapter *adap, int addr, int kind)
 	return ret;
 
 err:
-	kfree(codec);
 	kfree(i2c);
 	return ret;
 }
@@ -1595,6 +1593,11 @@ static int wm8990_probe(struct platform_device *pdev)
 #else
 		/* Add other interfaces here */
 #endif
+
+	if (ret != 0) {
+		kfree(codec->private_data);
+		kfree(codec);
+	}
 	return ret;
 }
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] ALSA fixes for 2.6.27-rc4
  2008-08-25 17:01 [GIT PULL] ALSA fixes for 2.6.27-rc4 Takashi Iwai
@ 2008-08-25 21:20 ` Tony Luck
  2008-08-26  5:22   ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Luck @ 2008-08-25 21:20 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Linus Torvalds, Andrew Morton, linux-kernel

On Mon, Aug 25, 2008 at 10:01 AM, Takashi Iwai <tiwai@suse.de> wrote:
> --- a/sound/pci/ca0106/ca0106_main.c
> +++ b/sound/pci/ca0106/ca0106_main.c
> @@ -249,11 +249,12 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
>           .name   = "MSI K8N Diamond MB [SB0438]",
>           .gpio_type = 2,
>           .i2c_adc = 1 } ,
> -        /* Another MSI K8N Diamond MB, which has apprently a different SSID */
> +        /* MSI K8N Diamond PLUS MB */
>         { .serial = 0x10091102,
>           .name   = "MSI K8N Diamond MB",
>           .gpio_type = 2,
> -          .i2c_adc = 1 } ,
> +          .i2c_adc = 1,
> +          .spi_dac = 2 }

Missing "," on this line is causing build failure here.

-Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] ALSA fixes for 2.6.27-rc4
  2008-08-25 21:20 ` Tony Luck
@ 2008-08-26  5:22   ` Takashi Iwai
  2008-08-26  5:35     ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Takashi Iwai @ 2008-08-26  5:22 UTC (permalink / raw)
  To: Tony Luck; +Cc: Linus Torvalds, Andrew Morton, linux-kernel

At Mon, 25 Aug 2008 14:20:07 -0700,
Tony Luck wrote:
> 
> On Mon, Aug 25, 2008 at 10:01 AM, Takashi Iwai <tiwai@suse.de> wrote:
> > --- a/sound/pci/ca0106/ca0106_main.c
> > +++ b/sound/pci/ca0106/ca0106_main.c
> > @@ -249,11 +249,12 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
> >           .name   = "MSI K8N Diamond MB [SB0438]",
> >           .gpio_type = 2,
> >           .i2c_adc = 1 } ,
> > -        /* Another MSI K8N Diamond MB, which has apprently a different SSID */
> > +        /* MSI K8N Diamond PLUS MB */
> >         { .serial = 0x10091102,
> >           .name   = "MSI K8N Diamond MB",
> >           .gpio_type = 2,
> > -          .i2c_adc = 1 } ,
> > +          .i2c_adc = 1,
> > +          .spi_dac = 2 }
> 
> Missing "," on this line is causing build failure here.

Yep, sorry, I propagated a wrong patch upward.
Will do a pull-request of the fixed patch soon.


thanks,

Takashi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [GIT PULL] ALSA fixes for 2.6.27-rc4
  2008-08-26  5:22   ` Takashi Iwai
@ 2008-08-26  5:35     ` Takashi Iwai
  0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2008-08-26  5:35 UTC (permalink / raw)
  To: Tony Luck; +Cc: Linus Torvalds, Andrew Morton, linux-kernel

At Tue, 26 Aug 2008 07:22:42 +0200,
I wrote:
> 
> At Mon, 25 Aug 2008 14:20:07 -0700,
> Tony Luck wrote:
> > 
> > On Mon, Aug 25, 2008 at 10:01 AM, Takashi Iwai <tiwai@suse.de> wrote:
> > > --- a/sound/pci/ca0106/ca0106_main.c
> > > +++ b/sound/pci/ca0106/ca0106_main.c
> > > @@ -249,11 +249,12 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
> > >           .name   = "MSI K8N Diamond MB [SB0438]",
> > >           .gpio_type = 2,
> > >           .i2c_adc = 1 } ,
> > > -        /* Another MSI K8N Diamond MB, which has apprently a different SSID */
> > > +        /* MSI K8N Diamond PLUS MB */
> > >         { .serial = 0x10091102,
> > >           .name   = "MSI K8N Diamond MB",
> > >           .gpio_type = 2,
> > > -          .i2c_adc = 1 } ,
> > > +          .i2c_adc = 1,
> > > +          .spi_dac = 2 }
> > 
> > Missing "," on this line is causing build failure here.
> 
> Yep, sorry, I propagated a wrong patch upward.
> Will do a pull-request of the fixed patch soon.

... and it was already fixed by Stephen's patch.


Thanks!

Takashi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [GIT PULL] ALSA fixes for 2.6.27-rc4
@ 2008-08-22 14:35 Takashi Iwai
  0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2008-08-22 14:35 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, linux-kernel

Linus,

please pull ALSA updates for 2.6.27-rc4 from:

  git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git for-linus

containing the following fixes.


Thanks!

Takashi

===

Peer Chen (1):
      ALSA: hda_intel: enable snoop for nvidia HDA controller

Takashi Iwai (1):
      ALSA: hda - Fix call of alc888_coef_init()

 sound/pci/hda/hda_intel.c     |    9 +++++++++
 sound/pci/hda/patch_realtek.c |    6 +++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index a73d6ca..1c53e33 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -278,6 +278,9 @@ enum {
 /* Defines for Nvidia HDA support */
 #define NVIDIA_HDA_TRANSREG_ADDR      0x4e
 #define NVIDIA_HDA_ENABLE_COHBITS     0x0f
+#define NVIDIA_HDA_ISTRM_COH          0x4d
+#define NVIDIA_HDA_OSTRM_COH          0x4c
+#define NVIDIA_HDA_ENABLE_COHBIT      0x01
 
 /* Defines for Intel SCH HDA snoop control */
 #define INTEL_SCH_HDA_DEVC      0x78
@@ -900,6 +903,12 @@ static void azx_init_pci(struct azx *chip)
 		update_pci_byte(chip->pci,
 				NVIDIA_HDA_TRANSREG_ADDR,
 				0x0f, NVIDIA_HDA_ENABLE_COHBITS);
+		update_pci_byte(chip->pci,
+				NVIDIA_HDA_ISTRM_COH,
+				0x01, NVIDIA_HDA_ENABLE_COHBIT);
+		update_pci_byte(chip->pci,
+				NVIDIA_HDA_OSTRM_COH,
+				0x01, NVIDIA_HDA_ENABLE_COHBIT);
 		break;
 	case AZX_DRIVER_SCH:
 		pci_read_config_word(chip->pci, INTEL_SCH_HDA_DEVC, &snoop);
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index b80e725..909f1c1 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -952,7 +952,7 @@ do_sku:
 					    tmp | 0x2010);
 			break;
 		case 0x10ec0888:
-			alc888_coef_init(codec);
+			/*alc888_coef_init(codec);*/ /* called in alc_init() */
 			break;
 		case 0x10ec0267:
 		case 0x10ec0268:
@@ -2439,6 +2439,8 @@ static int alc_init(struct hda_codec *codec)
 	unsigned int i;
 
 	alc_fix_pll(codec);
+	if (codec->vendor_id == 0x10ec0888)
+		alc888_coef_init(codec);
 
 	for (i = 0; i < spec->num_init_verbs; i++)
 		snd_hda_sequence_write(codec, spec->init_verbs[i]);
@@ -8426,8 +8428,6 @@ static int patch_alc883(struct hda_codec *codec)
 	codec->patch_ops = alc_patch_ops;
 	if (board_config == ALC883_AUTO)
 		spec->init_hook = alc883_auto_init;
-	else if (codec->vendor_id == 0x10ec0888)
-		spec->init_hook = alc888_coef_init;
 
 #ifdef CONFIG_SND_HDA_POWER_SAVE
 	if (!spec->loopback.amplist)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-26  5:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-25 17:01 [GIT PULL] ALSA fixes for 2.6.27-rc4 Takashi Iwai
2008-08-25 21:20 ` Tony Luck
2008-08-26  5:22   ` Takashi Iwai
2008-08-26  5:35     ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2008-08-22 14:35 Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®