Skip to contentSkip to conversation

duplicate SNDRV_PCM_FMTBIT_S{16,24}_BE

PATCH Superseded roel kluin 3 participants 5 messages Aug 18, 2008 – Aug 20, 2008

Subsystems (2)
lore
Share & tools
lore

roel kluin

author
#0 lore raw

PATCH 1/1 duplicate SNDRV_PCM_FMTBIT_S{16,24}_BE

untested, is it correct?
---
duplicate SNDRV_PCM_FMTBIT_S{16,24}_BE

---

sound/aoa/codecs/snd-aoa-codec-tas.c +4 -4
index 7a16a33..c922505 100644
@@ -654,15 +654,15 @@ static struct snd_kcontrol_new bass_control = {
 static struct transfer_info tas_transfers[] = {
 	{
 		/* input */
-		.formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_BE |
-			   SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S24_BE,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE |
+			   SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S24_BE,
 		.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
 		.transfer_in = 1,
 	},
 	{
 		/* output */
-		.formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_BE |
-			   SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S24_BE,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE |
+			   SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S24_BE,
 		.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
 		.transfer_in = 0,
 	},
maintainer
#1 lore raw
Quoted 1 line · roel kluin

untested, is it correct?

not a clue, do you know how long ago that was? :)
does the driver check endianness anywhere?

Quoted 33 lines

duplicate SNDRV_PCM_FMTBIT_S{16,24}_BE

---

sound/aoa/codecs/snd-aoa-codec-tas.c +4 -4
index 7a16a33..c922505 100644
@@ -654,15 +654,15 @@ static struct snd_kcontrol_new bass_control = {
 static struct transfer_info tas_transfers[] = {
 	{
 		/* input */
-		.formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_BE |
-			   SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S24_BE,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE |
+			   SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S24_BE,
 		.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |
 SNDRV_PCM_RATE_48000,
 		.transfer_in = 1,
 	},
 	{
 		/* output */
-		.formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_BE |
-			   SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S24_BE,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE |
+			   SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S24_BE,
 		.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |
 SNDRV_PCM_RATE_48000,
sound/aoa/codecs/snd-aoa-codec-tas.c +0 -0
 		.transfer_in = 0,
 	},
#2 lore raw

At Tue, 19 Aug 2008 08:15:05 +0200 (CEST),

Quoted 6 lines · Johannes Berg
Quoted 1 line · roel kluin

untested, is it correct?

not a clue, do you know how long ago that was? :)
does the driver check endianness anywhere?

AFAIK snd-aoa supports only bit-endian formats (at least in sound/aoa/soundbus/i2sbus-pcm.c), so this addition makes little sense.

Better to drop the duplicated words there.

thanks,

Takashi

Quoted 39 lines
Quoted 31 lines

duplicate SNDRV_PCM_FMTBIT_S{16,24}_BE

---

sound/aoa/codecs/snd-aoa-codec-tas.c +4 -4
index 7a16a33..c922505 100644
@@ -654,15 +654,15 @@ static struct snd_kcontrol_new bass_control = {
 static struct transfer_info tas_transfers[] = {
 	{
 		/* input */
-		.formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_BE |
-			   SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S24_BE,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE |
+			   SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S24_BE,
 		.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |
 SNDRV_PCM_RATE_48000,
 		.transfer_in = 1,
 	},
 	{
 		/* output */
-		.formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_BE |
-			   SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S24_BE,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE |
+			   SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S24_BE,
 		.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |
 SNDRV_PCM_RATE_48000,

sound/aoa/codecs/snd-aoa-codec-tas.c static struct snd_kcontrol_new bass_control = { · line 668

Quoted 2 lines
sound/aoa/codecs/snd-aoa-codec-tas.c +0 -0
 		.transfer_in = 0,
 	},

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

author
#3 lore raw

PATCH v2 1/1 duplicate SNDRV_PCM_FMTBIT_S{16,24}_BE

Quoted 4 lines · Takashi Iwai

At Tue, 19 Aug 2008 08:15:05 +0200 (CEST),

Quoted 2 lines · Johannes Berg
Quoted 1 line · roel kluin

untested, is it correct?

Quoted 8 lines
Quoted 2 lines

not a clue, do you know how long ago that was? :)
does the driver check endianness anywhere?

AFAIK snd-aoa supports only bit-endian formats (at least in sound/aoa/soundbus/i2sbus-pcm.c), so this addition makes little sense.

Better to drop the duplicated words there.

Thanks Johannes and Takashi,

FWIW this removes the duplicates.
---
Remove duplicate assignment of SNDRV_PCM_FMTBIT_S{16,24}_BE bits

---

sound/aoa/codecs/snd-aoa-codec-tas.c +2 -4
index 7a16a33..6c515b2 100644
@@ -654,15 +654,13 @@ static struct snd_kcontrol_new bass_control = {
 static struct transfer_info tas_transfers[] = {
 	{
 		/* input */
-		.formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_BE |
-			   SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S24_BE,
+		.formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S24_BE,
 		.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
 		.transfer_in = 1,
 	},
 	{
 		/* output */
-		.formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_BE |
-			   SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S24_BE,
+		.formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S24_BE,
 		.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
 		.transfer_in = 0,
 	},
Applied
#4 lore raw

At Tue, 19 Aug 2008 11:53:54 -0400,

Quoted 15 lines · roel kluin
Quoted 4 lines · Takashi Iwai

At Tue, 19 Aug 2008 08:15:05 +0200 (CEST),

Quoted 2 lines · Johannes Berg
Quoted 1 line · roel kluin

untested, is it correct?

Quoted 8 lines
Quoted 2 lines

not a clue, do you know how long ago that was? :)
does the driver check endianness anywhere?

AFAIK snd-aoa supports only bit-endian formats (at least in sound/aoa/soundbus/i2sbus-pcm.c), so this addition makes little sense.

Better to drop the duplicated words there.

Quoted 7 lines

Thanks Johannes and Takashi,

FWIW this removes the duplicates.
---
Remove duplicate assignment of SNDRV_PCM_FMTBIT_S{16,24}_BE bits

Thanks, applied this one now.

Takashi

Quoted 24 lines

---

sound/aoa/codecs/snd-aoa-codec-tas.c +2 -4
index 7a16a33..6c515b2 100644
@@ -654,15 +654,13 @@ static struct snd_kcontrol_new bass_control = {
 static struct transfer_info tas_transfers[] = {
 	{
 		/* input */
-		.formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_BE |
-			   SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S24_BE,
+		.formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S24_BE,
 		.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
 		.transfer_in = 1,
 	},
 	{
 		/* output */
-		.formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S16_BE |
-			   SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S24_BE,
+		.formats = SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_S24_BE,
 		.rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,
 		.transfer_in = 0,
 	},