From: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
To: Szymon Janc <szymon.janc@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 2/4] anrdoid/hal-health: Fix wrong channel type defines
Date: Mon, 16 Jun 2014 23:56:09 +0300 [thread overview]
Message-ID: <539F59E9.3080301@linux.intel.com> (raw)
In-Reply-To: <25982186.IBKSOpyphk@athlon>
Hi Szymon,
On 06/16/2014 11:16 PM, Szymon Janc wrote:
> Hi Ravi,
>
> On Monday 16 June 2014 20:51:12 Ravi kumar Veeramally wrote:
>> Enums in bt_hl.h are defined in this order BTHL_CHANNEL_TYPE_RELIABLE,
>> BTHL_CHANNEL_TYPE_STREAMING, BTHL_CHANNEL_TYPE_ANY. But HDP_SPEC_V11(3.4)
>> has no-preference(any)-0, reliable-1, stream-2, reserved(0x03-0xff).
>> ---
>> android/hal-health.c | 13 ++++++++++++-
>> android/hal-msg.h | 6 +++---
>> 2 files changed, 15 insertions(+), 4 deletions(-)
>>
>> diff --git a/android/hal-health.c b/android/hal-health.c
>> index ab06658..32c1b39 100644
>> --- a/android/hal-health.c
>> +++ b/android/hal-health.c
>> @@ -127,7 +127,18 @@ static bt_status_t
>> register_application(bthl_reg_param_t *reg, int *app_id) mdep->app_id =
>> rsp.app_id;
>> mdep->role = reg->mdep_cfg[i].mdep_role;
>> mdep->data_type = reg->mdep_cfg[i].data_type;
>> - mdep->channel_type = reg->mdep_cfg[i].channel_type;
>> +
>> + switch (reg->mdep_cfg[i].channel_type) {
>> + case BTHL_CHANNEL_TYPE_ANY:
>> + mdep->channel_type = HAL_HEALTH_CHANNEL_TYPE_ANY;
>> + break;
>> + case BTHL_CHANNEL_TYPE_RELIABLE:
>> + mdep->channel_type = HAL_HEALTH_CHANNEL_TYPE_RELIABLE;
>> + break;
>> + case BTHL_CHANNEL_TYPE_STREAMING:
>> + mdep->channel_type = HAL_HEALTH_CHANNEL_TYPE_STREAMING;
>> + break;
>> + }
>>
>> if (reg->mdep_cfg[i].mdep_description) {
>> mdep->descr_len =
>> diff --git a/android/hal-msg.h b/android/hal-msg.h
>> index 2c21a85..c95ac0f 100644
>> --- a/android/hal-msg.h
>> +++ b/android/hal-msg.h
>> @@ -388,9 +388,9 @@ struct hal_cmd_pan_disconnect {
>> #define HAL_HEALTH_MDEP_ROLE_SOURCE 0x00
>> #define HAL_HEALTH_MDEP_ROLE_SINK 0x01
>>
>> -#define HAL_HEALTH_CHANNEL_TYPE_RELIABLE 0x00
>> -#define HAL_HEALTH_CHANNEL_TYPE_STREAMING 0x01
>> -#define HAL_HEALTH_CHANNEL_TYPE_ANY 0x02
>> +#define HAL_HEALTH_CHANNEL_TYPE_ANY 0x00
>> +#define HAL_HEALTH_CHANNEL_TYPE_RELIABLE 0x01
>> +#define HAL_HEALTH_CHANNEL_TYPE_STREAMING 0x02
>>
>> #define HAL_OP_HEALTH_REG_APP 0x01
>> struct hal_cmd_health_reg_app {
>
> HAL library is suppose to be simple pipe as close to HAL API as possible. If
> such mapping is needed it should be done on daemon side in health.c.
> Possibly with helpers eg. android2channel_type().
>
Ok.
Regards,
Ravi.
next prev parent reply other threads:[~2014-06-16 20:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 17:51 [PATCH 0/4] Intiates L2CAP Control Channel Ravi kumar Veeramally
2014-06-16 17:51 ` [PATCH 1/4] profiles/health/hdp: Fix memory leak in SDP record preparati Sdp record preparation part is copied to android/health.c from profiles/health/hdp_utils.c. Memory leak is noticed while testing. Memory summay is from android daemon, but code snippet is same. It is already fixed in android/health.c while submitting android related patches Ravi kumar Veeramally
2014-06-16 17:51 ` [PATCH 2/4] anrdoid/hal-health: Fix wrong channel type defines Ravi kumar Veeramally
2014-06-16 20:16 ` Szymon Janc
2014-06-16 20:56 ` Ravi kumar Veeramally [this message]
2014-06-16 17:51 ` [PATCH 3/4] android/health: Initial connect channel implementation Ravi kumar Veeramally
2014-06-16 20:21 ` Szymon Janc
2014-06-16 20:57 ` Ravi kumar Veeramally
2014-06-16 17:51 ` [PATCH 4/4] android/health: Notify channel connection status Ravi kumar Veeramally
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=539F59E9.3080301@linux.intel.com \
--to=ravikumar.veeramally@linux.intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=szymon.janc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).