From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 4/5] handsfree-audio: Add function to get the codecs
Date: Fri, 05 Apr 2013 16:40:39 -0500 [thread overview]
Message-ID: <515F44D7.5030404@gmail.com> (raw)
In-Reply-To: <20130405205626.GI2715@samus>
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]
Hi Vinicius,
On 04/05/2013 03:56 PM, Vinicius Costa Gomes wrote:
> Hi Denis,
>
> On 12:32 Fri 05 Apr, Denis Kenzior wrote:
>>>
>>> +int ofono_handsfree_get_codecs(unsigned char *buffer, int buffer_len)
>>> +{
>>> + int len;
>>> +
>>> + if (agent == NULL)
>>> + return -EIO;
>>> +
>>> + len = MIN(buffer_len, agent->codecs_len);
>>> + memcpy(buffer, agent->codecs, len);
>>> +
>>> + return len;
>>> +}
>>> +
>>
>> Do we really want to memcpy here or return a const unsigned char
>> array? Also, right now we explicitly only support CVSD and mSBC, so
>> this is overkill.
>
> As we can assume that we always support CVSD, one idea is to have something
> like ofono_handsfree_audio_has_msbc() instead of the get_codecs() function.
> How does it sound?
I tend to like this better. Perhaps we can name this function a more
generic 'has_wideband()' instead. In case we want to provide support
for custom codecs in the future.
>
>>
>>> static void agent_free(struct agent *agent)
>>> {
>>> if (agent->watch> 0)
>>
>> Regards,
>> -Denis
>
>
> Cheers,
Regards,
-Denis
next prev parent reply other threads:[~2013-04-05 21:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-03 23:24 [PATCH 1/5] hfp_hf_bluez5: Add extracting version Vinicius Costa Gomes
2013-04-03 23:24 ` [PATCH 2/5] hfp_hf_bluez5: Add audio card .connect() for HFP 1.6 Vinicius Costa Gomes
2013-04-05 17:22 ` Denis Kenzior
2013-04-05 18:45 ` Vinicius Costa Gomes
2013-04-03 23:24 ` [PATCH 3/5] hfp_hf_bluez5: Select the audio card driver based on version Vinicius Costa Gomes
2013-04-05 17:33 ` Denis Kenzior
2013-04-03 23:24 ` [PATCH 4/5] handsfree-audio: Add function to get the codecs Vinicius Costa Gomes
2013-04-05 17:32 ` Denis Kenzior
2013-04-05 20:56 ` Vinicius Costa Gomes
2013-04-05 21:40 ` Denis Kenzior [this message]
2013-04-05 22:00 ` Vinicius Costa Gomes
2013-04-03 23:24 ` [PATCH 5/5] hfpmodem: Send AT+BAC with the supported codecs Vinicius Costa Gomes
2013-04-05 17:22 ` [PATCH 1/5] hfp_hf_bluez5: Add extracting version Denis Kenzior
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=515F44D7.5030404@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.