* [tinycompress]how should I call compress_open for aac ltp file playback?
@ 2013-06-05 6:46 Keyon.Jey
2013-06-05 8:01 ` Charles Keepax
0 siblings, 1 reply; 5+ messages in thread
From: Keyon.Jey @ 2013-06-05 6:46 UTC (permalink / raw)
To: ckeepax; +Cc: vinod.koul, alsa-devel
I am trying to use tinycompress for hwdecoder. everything works fine,
but after compress_open (with profile = SND_AUDIOPROFILE_AAC level=0
ch_mode=0 rate_control=0), the playback of my aac-ltp-16bit-48KHz-Stereo
file is faster than it should be. Am I wrong?
struct snd_codec {
__u32 id;
__u32 ch_in;
__u32 ch_out;
__u32 sample_rate;
__u32 bit_rate;
__u32 rate_control;
__u32 profile;
__u32 level;
__u32 ch_mode;
__u32 format;
__u32 align;
union snd_codec_options options;
__u32 reserved[3];
};
Keyon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [tinycompress]how should I call compress_open for aac ltp file playback?
2013-06-05 6:46 [tinycompress]how should I call compress_open for aac ltp file playback? Keyon.Jey
@ 2013-06-05 8:01 ` Charles Keepax
2013-06-05 8:27 ` Keyon.Jey
0 siblings, 1 reply; 5+ messages in thread
From: Charles Keepax @ 2013-06-05 8:01 UTC (permalink / raw)
To: Keyon.Jey; +Cc: vinod.koul, alsa-devel
On Wed, Jun 05, 2013 at 02:46:04PM +0800, Keyon.Jey wrote:
> I am trying to use tinycompress for hwdecoder. everything works fine,
> but after compress_open (with profile = SND_AUDIOPROFILE_AAC level=0
> ch_mode=0 rate_control=0), the playback of my aac-ltp-16bit-48KHz-Stereo
> file is faster than it should be. Am I wrong?
Vinod is probably the person for this one, as I am not so
familiar with what you guys have done internally. However, my
guess would be you are not setting the sample_rate correctly? It
likely needs to be set to the appropriate SNDRV_PCM_RATE_XXXX
define. The source for cplay included in the tinycompress
repository is a good example of using the tinycompress library.
Charles
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [tinycompress]how should I call compress_open for aac ltp file playback?
2013-06-05 8:01 ` Charles Keepax
@ 2013-06-05 8:27 ` Keyon.Jey
2013-06-07 0:23 ` Vinod Koul
0 siblings, 1 reply; 5+ messages in thread
From: Keyon.Jey @ 2013-06-05 8:27 UTC (permalink / raw)
To: Charles Keepax; +Cc: vinod.koul, alsa-devel
On 06/05/2013 04:01 PM, Charles Keepax wrote:
> On Wed, Jun 05, 2013 at 02:46:04PM +0800, Keyon.Jey wrote:
>> I am trying to use tinycompress for hwdecoder. everything works fine,
>> but after compress_open (with profile = SND_AUDIOPROFILE_AAC level=0
>> ch_mode=0 rate_control=0), the playback of my aac-ltp-16bit-48KHz-Stereo
>> file is faster than it should be. Am I wrong?
> Vinod is probably the person for this one, as I am not so
> familiar with what you guys have done internally. However, my
> guess would be you are not setting the sample_rate correctly? It
> likely needs to be set to the appropriate SNDRV_PCM_RATE_XXXX
> define. The source for cplay included in the tinycompress
> repository is a good example of using the tinycompress library.
>
> Charles
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
thanks, Charles. the print log showed me that I have set
SNDRV_PCM_RATE_48000 which seems no problem.
the cplay example code is only for mp3 file, and it also not set .level,
.ch_mode and .rate_control.
Vinod, what's your suggestion?
thanks,
Keyon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [tinycompress]how should I call compress_open for aac ltp file playback?
2013-06-05 8:27 ` Keyon.Jey
@ 2013-06-07 0:23 ` Vinod Koul
2013-06-07 6:46 ` Keyon.Jey
0 siblings, 1 reply; 5+ messages in thread
From: Vinod Koul @ 2013-06-07 0:23 UTC (permalink / raw)
To: Keyon.Jey; +Cc: Charles Keepax, alsa-devel
On Wed, Jun 05, 2013 at 04:27:44PM +0800, Keyon.Jey wrote:
> On 06/05/2013 04:01 PM, Charles Keepax wrote:
> >On Wed, Jun 05, 2013 at 02:46:04PM +0800, Keyon.Jey wrote:
> >>I am trying to use tinycompress for hwdecoder. everything works fine,
> >>but after compress_open (with profile = SND_AUDIOPROFILE_AAC level=0
> >>ch_mode=0 rate_control=0), the playback of my aac-ltp-16bit-48KHz-Stereo
> >>file is faster than it should be. Am I wrong?
> >Vinod is probably the person for this one, as I am not so
> >familiar with what you guys have done internally. However, my
> >guess would be you are not setting the sample_rate correctly? It
> >likely needs to be set to the appropriate SNDRV_PCM_RATE_XXXX
> >define. The source for cplay included in the tinycompress
> >repository is a good example of using the tinycompress library.
> >
> thanks, Charles. the print log showed me that I have set
> SNDRV_PCM_RATE_48000 which seems no problem.
> the cplay example code is only for mp3 file, and it also not set
> .level, .ch_mode and .rate_control.
> Vinod, what's your suggestion?
You need to ask your firmware guys, what are they expecting the these fields.
Some decoder implementations can be different. But i would expect the audio to
be broken, bad quality if that is the case.
But the speed of playback can be due to different decoder output rate and
different sampling rate configured. You are telling decoder 48Khz as CPM sample
rate, is that what decoder is understanding and conversion to decoder values
correct. Then you should check if the rendering to DAC is at 48KHz or not.
--
~Vinod
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [tinycompress]how should I call compress_open for aac ltp file playback?
2013-06-07 0:23 ` Vinod Koul
@ 2013-06-07 6:46 ` Keyon.Jey
0 siblings, 0 replies; 5+ messages in thread
From: Keyon.Jey @ 2013-06-07 6:46 UTC (permalink / raw)
To: Vinod Koul; +Cc: Charles Keepax, alsa-devel, Keyon.Jey
On 06/07/2013 08:23 AM, Vinod Koul wrote:
> On Wed, Jun 05, 2013 at 04:27:44PM +0800, Keyon.Jey wrote:
>> On 06/05/2013 04:01 PM, Charles Keepax wrote:
>>> On Wed, Jun 05, 2013 at 02:46:04PM +0800, Keyon.Jey wrote:
>>>> I am trying to use tinycompress for hwdecoder. everything works fine,
>>>> but after compress_open (with profile = SND_AUDIOPROFILE_AAC level=0
>>>> ch_mode=0 rate_control=0), the playback of my aac-ltp-16bit-48KHz-Stereo
>>>> file is faster than it should be. Am I wrong?
>>> Vinod is probably the person for this one, as I am not so
>>> familiar with what you guys have done internally. However, my
>>> guess would be you are not setting the sample_rate correctly? It
>>> likely needs to be set to the appropriate SNDRV_PCM_RATE_XXXX
>>> define. The source for cplay included in the tinycompress
>>> repository is a good example of using the tinycompress library.
>>>
>> thanks, Charles. the print log showed me that I have set
>> SNDRV_PCM_RATE_48000 which seems no problem.
>> the cplay example code is only for mp3 file, and it also not set
>> .level, .ch_mode and .rate_control.
>> Vinod, what's your suggestion?
> You need to ask your firmware guys, what are they expecting the these fields.
> Some decoder implementations can be different. But i would expect the audio to
> be broken, bad quality if that is the case.
>
> But the speed of playback can be due to different decoder output rate and
> different sampling rate configured. You are telling decoder 48Khz as CPM sample
> rate, is that what decoder is understanding and conversion to decoder values
> correct. Then you should check if the rendering to DAC is at 48KHz or not.
>
> --
> ~Vinod
>
thanks, Vinod, I will check with the firmware guys for these detail fields.
~Keyon
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-07 6:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-05 6:46 [tinycompress]how should I call compress_open for aac ltp file playback? Keyon.Jey
2013-06-05 8:01 ` Charles Keepax
2013-06-05 8:27 ` Keyon.Jey
2013-06-07 0:23 ` Vinod Koul
2013-06-07 6:46 ` Keyon.Jey
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.