All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ASoC updates for 2.6.28
@ 2008-10-30 12:36 Mark Brown
  2008-10-30 12:37 ` [PATCH 1/3] ASoC: Fix mono controls after conversion to support full int masks Mark Brown
  2008-10-30 13:15 ` [PATCH 0/3] ASoC updates for 2.6.28 Takashi Iwai
  0 siblings, 2 replies; 8+ messages in thread
From: Mark Brown @ 2008-10-30 12:36 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

These patches contain a few updates for 2.6.28.  The fix for mono
controls is very important, the other two changes less so.

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

* [PATCH 1/3] ASoC: Fix mono controls after conversion to support full int masks
  2008-10-30 12:36 [PATCH 0/3] ASoC updates for 2.6.28 Mark Brown
@ 2008-10-30 12:37 ` Mark Brown
  2008-10-30 12:37   ` [PATCH 2/3] ASoC: Fix some minor errors in mpc5200 psc i2s driver Mark Brown
  2008-10-30 13:15 ` [PATCH 0/3] ASoC updates for 2.6.28 Takashi Iwai
  1 sibling, 1 reply; 8+ messages in thread
From: Mark Brown @ 2008-10-30 12:37 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Mark Brown

When ASoC was converted to support full int width masks SOC_SINGLE_VALUE()
omitted the assignment of rshift, causing the control operatins to report
some mono controls as stereo. This happened to work some of the time due
to a confusion between shift and min in snd_soc_info_volsw().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 include/sound/soc.h  |    3 ++-
 sound/soc/soc-core.c |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index a1e0357..5e01898 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -28,7 +28,8 @@
  */
 #define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) \
 	((unsigned long)&(struct soc_mixer_control) \
-	{.reg = xreg, .shift = xshift, .max = xmax, .invert = xinvert})
+	{.reg = xreg, .shift = xshift, .rshift = xshift, .max = xmax, \
+	.invert = xinvert})
 #define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \
 	((unsigned long)&(struct soc_mixer_control) \
 	{.reg = xreg, .max = xmax, .invert = xinvert})
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 462e635..a3adbf0 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1462,7 +1462,7 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol,
 	struct soc_mixer_control *mc =
 		(struct soc_mixer_control *)kcontrol->private_value;
 	int max = mc->max;
-	unsigned int shift = mc->min;
+	unsigned int shift = mc->shift;
 	unsigned int rshift = mc->rshift;
 
 	if (max == 1)
-- 
1.5.6.5

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

* [PATCH 2/3] ASoC: Fix some minor errors in mpc5200 psc i2s driver
  2008-10-30 12:37 ` [PATCH 1/3] ASoC: Fix mono controls after conversion to support full int masks Mark Brown
@ 2008-10-30 12:37   ` Mark Brown
  2008-10-30 12:37     ` [PATCH 3/3] ASoC: Fix WM9713 ALC Decay Time name Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2008-10-30 12:37 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Mark Brown

From: Jon Smirl <jonsmirl@gmail.com>

Fix missing unsigned for irqsave flags in psc i2s driver
Make attribute visiblity static
Collect all sysfs errors before checking status

[Word wrapped DEVICE_ATTR() lines for 80 columns -- broonie]

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/fsl/mpc5200_psc_i2s.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c
index 8692329..94a02ea 100644
--- a/sound/soc/fsl/mpc5200_psc_i2s.c
+++ b/sound/soc/fsl/mpc5200_psc_i2s.c
@@ -277,7 +277,7 @@ static int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd)
 	struct mpc52xx_psc __iomem *regs = psc_i2s->psc_regs;
 	u16 imr;
 	u8 psc_cmd;
-	long flags;
+	unsigned long flags;
 
 	if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)
 		s = &psc_i2s->capture;
@@ -699,9 +699,11 @@ static ssize_t psc_i2s_stat_store(struct device *dev,
 	return count;
 }
 
-DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL);
-DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store);
-DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store);
+static DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL);
+static DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show,
+			psc_i2s_stat_store);
+static DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show,
+			psc_i2s_stat_store);
 
 /* ---------------------------------------------------------------------
  * OF platform bus binding code:
@@ -819,8 +821,8 @@ static int __devinit psc_i2s_of_probe(struct of_device *op,
 
 	/* Register the SYSFS files */
 	rc = device_create_file(psc_i2s->dev, &dev_attr_status);
-	rc = device_create_file(psc_i2s->dev, &dev_attr_capture_overrun);
-	rc = device_create_file(psc_i2s->dev, &dev_attr_playback_underrun);
+	rc |= device_create_file(psc_i2s->dev, &dev_attr_capture_overrun);
+	rc |= device_create_file(psc_i2s->dev, &dev_attr_playback_underrun);
 	if (rc)
 		dev_info(psc_i2s->dev, "error creating sysfs files\n");
 
-- 
1.5.6.5

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

* [PATCH 3/3] ASoC: Fix WM9713 ALC Decay Time name
  2008-10-30 12:37   ` [PATCH 2/3] ASoC: Fix some minor errors in mpc5200 psc i2s driver Mark Brown
@ 2008-10-30 12:37     ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2008-10-30 12:37 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Mark Brown

The control had an extra space at the end of the name.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm9713.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c
index aba402b..945b32e 100644
--- a/sound/soc/codecs/wm9713.c
+++ b/sound/soc/codecs/wm9713.c
@@ -140,7 +140,7 @@ SOC_SINGLE("Capture ADC Boost (+20dB) Switch", AC97_VIDEO, 6, 1, 0),
 
 SOC_SINGLE("ALC Target Volume", AC97_CODEC_CLASS_REV, 12, 15, 0),
 SOC_SINGLE("ALC Hold Time", AC97_CODEC_CLASS_REV, 8, 15, 0),
-SOC_SINGLE("ALC Decay Time ", AC97_CODEC_CLASS_REV, 4, 15, 0),
+SOC_SINGLE("ALC Decay Time", AC97_CODEC_CLASS_REV, 4, 15, 0),
 SOC_SINGLE("ALC Attack Time", AC97_CODEC_CLASS_REV, 0, 15, 0),
 SOC_ENUM("ALC Function", wm9713_enum[6]),
 SOC_SINGLE("ALC Max Volume", AC97_PCI_SVID, 11, 7, 0),
-- 
1.5.6.5

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

* Re: [PATCH 0/3] ASoC updates for 2.6.28
  2008-10-30 12:36 [PATCH 0/3] ASoC updates for 2.6.28 Mark Brown
  2008-10-30 12:37 ` [PATCH 1/3] ASoC: Fix mono controls after conversion to support full int masks Mark Brown
@ 2008-10-30 13:15 ` Takashi Iwai
  2008-10-30 13:16   ` Takashi Iwai
  2008-10-30 13:20   ` Mark Brown
  1 sibling, 2 replies; 8+ messages in thread
From: Takashi Iwai @ 2008-10-30 13:15 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel

At Thu, 30 Oct 2008 12:36:49 +0000,
Mark Brown wrote:
> 
> These patches contain a few updates for 2.6.28.  The fix for mono
> controls is very important, the other two changes less so.

Are they also for stable (2.6.27 or earlier) kernels?
If so, you can put 'Cc: stable@kernel.org', so that stable kernel guys
will take it automatically when merged to the upstream.


Takashi

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

* Re: [PATCH 0/3] ASoC updates for 2.6.28
  2008-10-30 13:15 ` [PATCH 0/3] ASoC updates for 2.6.28 Takashi Iwai
@ 2008-10-30 13:16   ` Takashi Iwai
  2008-10-30 13:20   ` Mark Brown
  1 sibling, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2008-10-30 13:16 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel

At Thu, 30 Oct 2008 14:15:10 +0100,
I wrote:
> 
> At Thu, 30 Oct 2008 12:36:49 +0000,
> Mark Brown wrote:
> > 
> > These patches contain a few updates for 2.6.28.  The fix for mono
> > controls is very important, the other two changes less so.
> 
> Are they also for stable (2.6.27 or earlier) kernels?
> If so, you can put 'Cc: stable@kernel.org', so that stable kernel guys
> will take it automatically when merged to the upstream.

Just to make clear: I meant to put a Cc: line around sign-off lines.
Not meant as to post the patch to stable@kernel.org.


Takashi

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

* Re: [PATCH 0/3] ASoC updates for 2.6.28
  2008-10-30 13:15 ` [PATCH 0/3] ASoC updates for 2.6.28 Takashi Iwai
  2008-10-30 13:16   ` Takashi Iwai
@ 2008-10-30 13:20   ` Mark Brown
  2008-10-30 13:27     ` Takashi Iwai
  1 sibling, 1 reply; 8+ messages in thread
From: Mark Brown @ 2008-10-30 13:20 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

On Thu, Oct 30, 2008 at 02:15:10PM +0100, Takashi Iwai wrote:
> Mark Brown wrote:

> > These patches contain a few updates for 2.6.28.  The fix for mono
> > controls is very important, the other two changes less so.

> Are they also for stable (2.6.27 or earlier) kernels?
> If so, you can put 'Cc: stable@kernel.org', so that stable kernel guys
> will take it automatically when merged to the upstream.

No, the only one that affects anything before 2.6.28 is the WM9713 one.

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

* Re: [PATCH 0/3] ASoC updates for 2.6.28
  2008-10-30 13:20   ` Mark Brown
@ 2008-10-30 13:27     ` Takashi Iwai
  0 siblings, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2008-10-30 13:27 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel

At Thu, 30 Oct 2008 13:20:08 +0000,
Mark Brown wrote:
> 
> On Thu, Oct 30, 2008 at 02:15:10PM +0100, Takashi Iwai wrote:
> > Mark Brown wrote:
> 
> > > These patches contain a few updates for 2.6.28.  The fix for mono
> > > controls is very important, the other two changes less so.
> 
> > Are they also for stable (2.6.27 or earlier) kernels?
> > If so, you can put 'Cc: stable@kernel.org', so that stable kernel guys
> > will take it automatically when merged to the upstream.
> 
> No, the only one that affects anything before 2.6.28 is the WM9713 one.

OK, applied them and pushed out now.
I'll send a pull request later today.

thanks,

Takashi

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

end of thread, other threads:[~2008-10-30 13:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-30 12:36 [PATCH 0/3] ASoC updates for 2.6.28 Mark Brown
2008-10-30 12:37 ` [PATCH 1/3] ASoC: Fix mono controls after conversion to support full int masks Mark Brown
2008-10-30 12:37   ` [PATCH 2/3] ASoC: Fix some minor errors in mpc5200 psc i2s driver Mark Brown
2008-10-30 12:37     ` [PATCH 3/3] ASoC: Fix WM9713 ALC Decay Time name Mark Brown
2008-10-30 13:15 ` [PATCH 0/3] ASoC updates for 2.6.28 Takashi Iwai
2008-10-30 13:16   ` Takashi Iwai
2008-10-30 13:20   ` Mark Brown
2008-10-30 13:27     ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.