Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] alsa-utils: Add patch for amixer TLV output
@ 2011-07-11 15:43 Daniel Mack
  2011-07-11 19:27 ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Mack @ 2011-07-11 15:43 UTC (permalink / raw)
  To: buildroot

This patch is queued upstream, so it can be dropped once a new version
of alsa-utils is released.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 .../alsa-utils/alsa-utils-amixer-tlv-fix.patch     |   32 ++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)
 create mode 100644 package/multimedia/alsa-utils/alsa-utils-amixer-tlv-fix.patch

diff --git a/package/multimedia/alsa-utils/alsa-utils-amixer-tlv-fix.patch b/package/multimedia/alsa-utils/alsa-utils-amixer-tlv-fix.patch
new file mode 100644
index 0000000..1b5e9c5
--- /dev/null
+++ b/package/multimedia/alsa-utils/alsa-utils-amixer-tlv-fix.patch
@@ -0,0 +1,32 @@
+diff --git a/amixer/amixer.c b/amixer/amixer.c
+index a177288..3bc6743 100644
+--- a/amixer/amixer.c
++++ b/amixer/amixer.c
+@@ -517,20 +517,20 @@ static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_
+ #ifdef SND_CTL_TLVT_DB_RANGE
+ 	case SND_CTL_TLVT_DB_RANGE:
+ 		printf("dBrange-\n");
+-		if ((size / (6 * sizeof(unsigned int))) != 0) {
++		if ((size % (6 * sizeof(unsigned int))) != 0) {
+ 			while (size > 0) {
+ 				printf("0x%08x,", tlv[idx++]);
+ 				size -= sizeof(unsigned int);
+ 			}
+ 			break;
+ 		}
+-		idx = 0;
+-		while (idx < size) {
++		while (size >= 0) {
+ 			print_spaces(spaces + 2);
+-			printf("rangemin=%i,", tlv[0]);
+-			printf(",rangemax=%i\n", tlv[1]);
+-			decode_tlv(spaces + 4, tlv + 2, 6 * sizeof(unsigned int));
+-			idx += 6 * sizeof(unsigned int);
++			printf("rangemin=%i,", tlv[idx++]);
++			printf(",rangemax=%i\n", tlv[idx++]);
++			decode_tlv(spaces + 4, tlv + idx, 4 * sizeof(unsigned int));
++			idx += 4 * sizeof(unsigned int);
++			size -= 6 * sizeof(unsigned int);
+ 		}
+ 		break;
+ #endif
-- 
1.7.5.4

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

* [Buildroot] [PATCH] alsa-utils: Add patch for amixer TLV output
  2011-07-11 15:43 [Buildroot] [PATCH] alsa-utils: Add patch for amixer TLV output Daniel Mack
@ 2011-07-11 19:27 ` Peter Korsgaard
  2011-07-12 12:57   ` Daniel Mack
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2011-07-11 19:27 UTC (permalink / raw)
  To: buildroot

>>>>> "Daniel" == Daniel Mack <zonque@gmail.com> writes:

 Daniel> This patch is queued upstream, so it can be dropped once a new version
 Daniel> of alsa-utils is released.

Could you give a quick explanation about what the patch does for people
not following alsa development?

 Daniel> Signed-off-by: Daniel Mack <zonque@gmail.com>
 Daniel> ---
 Daniel>  .../alsa-utils/alsa-utils-amixer-tlv-fix.patch     |   32 ++++++++++++++++++++
 Daniel>  1 files changed, 32 insertions(+), 0 deletions(-)
 Daniel>  create mode 100644 package/multimedia/alsa-utils/alsa-utils-amixer-tlv-fix.patch

 Daniel> diff --git a/package/multimedia/alsa-utils/alsa-utils-amixer-tlv-fix.patch b/package/multimedia/alsa-utils/alsa-utils-amixer-tlv-fix.patch
 Daniel> new file mode 100644
 Daniel> index 0000000..1b5e9c5
 Daniel> --- /dev/null
 Daniel> +++ b/package/multimedia/alsa-utils/alsa-utils-amixer-tlv-fix.patch
 Daniel> @@ -0,0 +1,32 @@

Please add a full git-style patch header with your signed-off-by (which
should be easy to do if it's upstream).

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] alsa-utils: Add patch for amixer TLV output
  2011-07-11 19:27 ` Peter Korsgaard
@ 2011-07-12 12:57   ` Daniel Mack
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Mack @ 2011-07-12 12:57 UTC (permalink / raw)
  To: buildroot

On Mon, Jul 11, 2011 at 9:27 PM, Peter Korsgaard <jacmet@uclibc.org> wrote:
>>>>>> "Daniel" == Daniel Mack <zonque@gmail.com> writes:
>
> ?Daniel> This patch is queued upstream, so it can be dropped once a new version
> ?Daniel> of alsa-utils is released.
>
> Could you give a quick explanation about what the patch does for people
> not following alsa development?

It is about a specific ALSA control and the way it can be accessed
using the amixer command line tool. But it's not that important after
all, and as it will be fixed in the next release anyway, we can just
wait for it.


Thanks,
Daniel

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

end of thread, other threads:[~2011-07-12 12:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-11 15:43 [Buildroot] [PATCH] alsa-utils: Add patch for amixer TLV output Daniel Mack
2011-07-11 19:27 ` Peter Korsgaard
2011-07-12 12:57   ` Daniel Mack

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