linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH hcidump] avrcp: fix name of metadata field
@ 2011-09-08 23:32 Lucas De Marchi
  2011-09-09 12:22 ` David Stockwell
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Lucas De Marchi @ 2011-09-08 23:32 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Lucas De Marchi

Metadata field number 0x7 should be the track duration and not the
progress of the track playback. Thus rename it to a better description.
---
 parser/avrcp.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/parser/avrcp.c b/parser/avrcp.c
index f8e4443..0b98a3e 100644
--- a/parser/avrcp.c
+++ b/parser/avrcp.c
@@ -166,7 +166,7 @@
 #define AVRCP_MEDIA_ATTRIBUTE_TRACK	0x4
 #define AVRCP_MEDIA_ATTRIBUTE_TOTAL	0x5
 #define AVRCP_MEDIA_ATTRIBUTE_GENRE	0x6
-#define AVRCP_MEDIA_ATTRIBUTE_PROGRESS	0x7
+#define AVRCP_MEDIA_ATTRIBUTE_DURATION	0x7
 
 /* play status */
 #define AVRCP_PLAY_STATUS_STOPPED	0x00
@@ -909,8 +909,8 @@ static const char *mediattr2str(uint32_t attr)
 		return "Track Total";
 	case AVRCP_MEDIA_ATTRIBUTE_GENRE:
 		return "Genre";
-	case AVRCP_MEDIA_ATTRIBUTE_PROGRESS:
-		return "Progress";
+	case AVRCP_MEDIA_ATTRIBUTE_DURATION:
+		return "Track duration";
 	default:
 		return "Reserved";
 	}
-- 
1.7.6.1


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

* Re: [PATCH hcidump] avrcp: fix name of metadata field
  2011-09-08 23:32 [PATCH hcidump] avrcp: fix name of metadata field Lucas De Marchi
@ 2011-09-09 12:22 ` David Stockwell
  2011-09-09 13:29   ` Lucas De Marchi
  2011-09-12 15:05 ` Luiz Augusto von Dentz
  2011-09-27  9:57 ` Johan Hedberg
  2 siblings, 1 reply; 6+ messages in thread
From: David Stockwell @ 2011-09-09 12:22 UTC (permalink / raw)
  To: Lucas De Marchi, linux-bluetooth; +Cc: Lucas De Marchi

That's fair.  For what it's worth, would this be better as an enum?

DS

-----Original Message----- 
From: Lucas De Marchi
Sent: Thursday, September 08, 2011 6:32 PM
To: linux-bluetooth@vger.kernel.org
Cc: Lucas De Marchi
Subject: [PATCH hcidump] avrcp: fix name of metadata field

Metadata field number 0x7 should be the track duration and not the
progress of the track playback. Thus rename it to a better description.
---
parser/avrcp.c |    6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/parser/avrcp.c b/parser/avrcp.c
index f8e4443..0b98a3e 100644
--- a/parser/avrcp.c
+++ b/parser/avrcp.c
@@ -166,7 +166,7 @@
#define AVRCP_MEDIA_ATTRIBUTE_TRACK 0x4
#define AVRCP_MEDIA_ATTRIBUTE_TOTAL 0x5
#define AVRCP_MEDIA_ATTRIBUTE_GENRE 0x6
-#define AVRCP_MEDIA_ATTRIBUTE_PROGRESS 0x7
+#define AVRCP_MEDIA_ATTRIBUTE_DURATION 0x7

/* play status */
#define AVRCP_PLAY_STATUS_STOPPED 0x00
@@ -909,8 +909,8 @@ static const char *mediattr2str(uint32_t attr)
  return "Track Total";
  case AVRCP_MEDIA_ATTRIBUTE_GENRE:
  return "Genre";
- case AVRCP_MEDIA_ATTRIBUTE_PROGRESS:
- return "Progress";
+ case AVRCP_MEDIA_ATTRIBUTE_DURATION:
+ return "Track duration";
  default:
  return "Reserved";
  }
-- 
1.7.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" 
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html 


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

* Re: [PATCH hcidump] avrcp: fix name of metadata field
  2011-09-09 12:22 ` David Stockwell
@ 2011-09-09 13:29   ` Lucas De Marchi
  2011-09-09 23:16     ` David Stockwell
  0 siblings, 1 reply; 6+ messages in thread
From: Lucas De Marchi @ 2011-09-09 13:29 UTC (permalink / raw)
  To: David Stockwell; +Cc: linux-bluetooth

Hi David,

On Fri, Sep 9, 2011 at 9:22 AM, David Stockwell
<dstockwell@frequency-one.com> wrote:
> That's fair.  For what it's worth, would this be better as an enum?

Please, don't top-post.

The avrcp parser in hcidump was done entirely with defines... I don't
see any point in changing that.

Lucas De Marchi

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

* Re: [PATCH hcidump] avrcp: fix name of metadata field
  2011-09-09 13:29   ` Lucas De Marchi
@ 2011-09-09 23:16     ` David Stockwell
  0 siblings, 0 replies; 6+ messages in thread
From: David Stockwell @ 2011-09-09 23:16 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: linux-bluetooth

Hi Lucas,

-----Original Message----- 
From: Lucas De Marchi
Sent: Friday, September 09, 2011 8:29 AM
To: David Stockwell
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH hcidump] avrcp: fix name of metadata field

Hi David,

On Fri, Sep 9, 2011 at 9:22 AM, David Stockwell
<dstockwell@frequency-one.com> wrote:
> That's fair.  For what it's worth, would this be better as an enum?

Please, don't top-post.

++++ I realized I did it afterwards, sorry.  I then decided it would be 
wasteful to send yet another e-mail (to you, Johan, the devel list, etc.) 
apologizing.
For most of my e-mail, I am on Windows 7, and I just forgot.

The avrcp parser in hcidump was done entirely with defines... I don't
see any point in changing that.

+++++ At this point, I agree with you, and in fact coded my version the same 
way.  In the Windows/.Net world, they strongly recommend enums because the 
compilers can provide somewhat better error checking.  No matter either way, 
just something to think about.

Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" 
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html 


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

* Re: [PATCH hcidump] avrcp: fix name of metadata field
  2011-09-08 23:32 [PATCH hcidump] avrcp: fix name of metadata field Lucas De Marchi
  2011-09-09 12:22 ` David Stockwell
@ 2011-09-12 15:05 ` Luiz Augusto von Dentz
  2011-09-27  9:57 ` Johan Hedberg
  2 siblings, 0 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2011-09-12 15:05 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: linux-bluetooth, David Stockwell

Hi Lucas,

On Fri, Sep 9, 2011 at 2:32 AM, Lucas De Marchi
<lucas.demarchi@profusion.mobi> wrote:
> Metadata field number 0x7 should be the track duration and not the
> progress of the track playback. Thus rename it to a better description.
> ---
>  parser/avrcp.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/parser/avrcp.c b/parser/avrcp.c
> index f8e4443..0b98a3e 100644
> --- a/parser/avrcp.c
> +++ b/parser/avrcp.c
> @@ -166,7 +166,7 @@
>  #define AVRCP_MEDIA_ATTRIBUTE_TRACK    0x4
>  #define AVRCP_MEDIA_ATTRIBUTE_TOTAL    0x5
>  #define AVRCP_MEDIA_ATTRIBUTE_GENRE    0x6
> -#define AVRCP_MEDIA_ATTRIBUTE_PROGRESS 0x7
> +#define AVRCP_MEDIA_ATTRIBUTE_DURATION 0x7
>
>  /* play status */
>  #define AVRCP_PLAY_STATUS_STOPPED      0x00
> @@ -909,8 +909,8 @@ static const char *mediattr2str(uint32_t attr)
>                return "Track Total";
>        case AVRCP_MEDIA_ATTRIBUTE_GENRE:
>                return "Genre";
> -       case AVRCP_MEDIA_ATTRIBUTE_PROGRESS:
> -               return "Progress";
> +       case AVRCP_MEDIA_ATTRIBUTE_DURATION:
> +               return "Track duration";
>        default:
>                return "Reserved";
>        }
> --
> 1.7.6.1

Ack

@David: Lets keep hcidump simple, if we start doing enums for
everything in hcidump we would just introduce more code for almost
nothing back for a tracing tool.

-- 
Luiz Augusto von Dentz

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

* Re: [PATCH hcidump] avrcp: fix name of metadata field
  2011-09-08 23:32 [PATCH hcidump] avrcp: fix name of metadata field Lucas De Marchi
  2011-09-09 12:22 ` David Stockwell
  2011-09-12 15:05 ` Luiz Augusto von Dentz
@ 2011-09-27  9:57 ` Johan Hedberg
  2 siblings, 0 replies; 6+ messages in thread
From: Johan Hedberg @ 2011-09-27  9:57 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: linux-bluetooth

Hi Lucas,

On Thu, Sep 08, 2011, Lucas De Marchi wrote:
> Metadata field number 0x7 should be the track duration and not the
> progress of the track playback. Thus rename it to a better description.
> ---
>  parser/avrcp.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

Applied. Thanks.

Johan

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

end of thread, other threads:[~2011-09-27  9:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-08 23:32 [PATCH hcidump] avrcp: fix name of metadata field Lucas De Marchi
2011-09-09 12:22 ` David Stockwell
2011-09-09 13:29   ` Lucas De Marchi
2011-09-09 23:16     ` David Stockwell
2011-09-12 15:05 ` Luiz Augusto von Dentz
2011-09-27  9:57 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).