Skip to contentSkip to conversation

ALSA: AACI: fix recording bug

PATCH In review Russell King - ARM Linux 2 participants 4 messages Nov 29, 2009 – Nov 30, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 ALSA: AACI: fix recording bug

pcm->r[1].slots is the double rate slot information, not the capture information. For capture, 'pcm' will already be the capture ac97 pcm structure.

---
 sound/arm/aaci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/arm/aaci.c +1 -1
index 1456fc7..eb715e7 100644
@@ -518,7 +518,7 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream,
 	else
 		err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
 					params_channels(params),
-					aacirun->pcm->r[1].slots);
+					aacirun->pcm->r[0].slots);
 
 	if (err)
 		goto out;
Signature · 1 line
1.6.2.5
#1 lore raw

At Sun, 29 Nov 2009 16:39:59 +0000,

Quoted 15 lines · Russell King - ARM Linux

pcm->r[1].slots is the double rate slot information, not the capture information. For capture, 'pcm' will already be the capture ac97 pcm structure.

---
 sound/arm/aaci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/arm/aaci.c +0 -0
index 1456fc7..eb715e7 100644

sound/arm/aaci.c static int aaci_pcm_hw_params(struct snd_pcm_substream *substream, · line 521

Quoted 5 lines
sound/arm/aaci.c +1 -1
@@ -518,7 +518,7 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream,
 	else
 		err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
 					params_channels(params),
-					aacirun->pcm->r[1].slots);
+					aacirun->pcm->r[0].slots);

Then we can get rid of the whole if check and the else block here. The arguments to be passed are identical for both playback and capture directions.

thanks,

Takashi

#2 lore raw
Quoted 12 lines · Takashi Iwai

At Sun, 29 Nov 2009 16:39:59 +0000,

Quoted 10 lines · Russell King - ARM Linux

pcm->r[1].slots is the double rate slot information, not the capture information. For capture, 'pcm' will already be the capture ac97 pcm structure.

---
 sound/arm/aaci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 14 lines

sound/arm/aaci.c static int aaci_pcm_hw_params(struct snd_pcm_substream *substream, · line 521

Quoted 10 lines
sound/arm/aaci.c +1 -1
index 1456fc7..eb715e7 100644
@@ -518,7 +518,7 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream,
 	else
 		err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
 					params_channels(params),
-					aacirun->pcm->r[1].slots);
+					aacirun->pcm->r[0].slots);

Then we can get rid of the whole if check and the else block here. The arguments to be passed are identical for both playback and capture directions.

Yes. That's a cleanup patch (and as such a separate patch). Since we're this late in the -rc cycle, I'd prefer to do just minimal changes.

#3 lore raw

At Mon, 30 Nov 2009 10:22:28 +0000,

Quoted 29 lines · Russell King - ARM Linux
Quoted 12 lines · Takashi Iwai

At Sun, 29 Nov 2009 16:39:59 +0000,

Quoted 10 lines · Russell King - ARM Linux

pcm->r[1].slots is the double rate slot information, not the capture information. For capture, 'pcm' will already be the capture ac97 pcm structure.

---
 sound/arm/aaci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 14 lines

sound/arm/aaci.c static int aaci_pcm_hw_params(struct snd_pcm_substream *substream, · line 521

Quoted 10 lines
sound/arm/aaci.c +1 -1
index 1456fc7..eb715e7 100644
@@ -518,7 +518,7 @@ static int aaci_pcm_hw_params(struct snd_pcm_substream *substream,
 	else
 		err = snd_ac97_pcm_open(aacirun->pcm, params_rate(params),
 					params_channels(params),
-					aacirun->pcm->r[1].slots);
+					aacirun->pcm->r[0].slots);

Then we can get rid of the whole if check and the else block here. The arguments to be passed are identical for both playback and capture directions.

Quoted 3 lines

Yes. That's a cleanup patch (and as such a separate patch). Since we're this late in the -rc cycle, I'd prefer to do just minimal changes.

Fair enough.
Then I suppose it should be Cc'ed to stable kernel, too?

thanks,

Takashi