Hi Glenn,
I'm back on this after some time.. Thanks for the useful suggestion, to
start from one such examples. I think tinyalsa it's much easier than going
for the full ALSA-lib integration.
After studying a bit the device/asus/grouper/audio implemenation, I adapted
this to make it boot on my device, but unfortunately there are differences
in the list of mixer controls, that make the audio lib init to fail.
I put debug logs to tinyalsa/mixer.c, in mixer_open(), and I got these
"controls" from my device:
Mixer 0 control 0: 'OFF'
Mixer 0 control 1: 'MIC_normal'
Mixer 0 control 2: 'MIC_ringtone'
Mixer 0 control 3: 'MIC_incall'
Mixer 0 control 4: 'Headset_normal'
Mixer 0 control 5: 'Headset_ringtone'
Mixer 0 control 6: 'Headset_incall'
Mixer 0 control 0: '7.35kHz'
Mixer 0 control 1: '8kHz'
Mixer 0 control 2: '11.025kHz'
Mixer 0 control 3: '12kHz'
Mixer 0 control 4: '14.7kHz'
Mixer 0 control 5: '16kHz'
Mixer 0 control 6: '22.05kHz'
Mixer 0 control 7: '24kHz'
Mixer 0 control 8: '29.4kHz'
Mixer 0 control 9: '32kHz'
Mixer 0 control 10: '44.1kHz'
Mixer 0 control 11: '48kHz'
Mixer 1 control 0: 'OFF'
Mixer 1 control 1: 'Speaker_normal'
Mixer 1 control 2: 'Speaker_ringtone'
Mixer 1 control 3: 'Speaker_incall'
Mixer 1 control 4: 'Earpiece_ringtone'
Mixer 1 control 5: 'Earpiece_incall'
Mixer 1 control 6: 'Headset_normal'
Mixer 1 control 7: 'Headset_ringtone'
Mixer 1 control 8: 'Headset_incall'
These are very different from those listed in
device/asus/grouper/mixer_paths.xml:
<mixer>
<!-- These are the initial mixer settings -->
<ctl name="Speaker Playback Switch" value="0" />
<ctl name="Int Spk Switch" value="0" />
<ctl name="HP Playback Switch" value="0" />
...
<path name="speaker">
<ctl name="Speaker Playback Switch" value="1" />
<ctl name="Int Spk Switch" value="1" />
<ctl name="DAC IF1 SWITCH" value="swap" />
</path>
<path name="headphone">
<ctl name="HP Playback Switch" value="1" />
<ctl name="Headphone Jack Switch" value="1" />
...
Do you have suggestions, about how to adapt mixer_paths.xml to my device?
What should I look at?
thanks in advance
Fabio
On Saturday, 10 November 2012 00:23:04 UTC+1, Glenn Kasten wrote:
>
> I am not familiar with the Renesas code you mention,
> so this will be a generic answer and may not answer your specific question
> ...
>
> I recommend looking at external/tinyalsa and a few of the recent audio HAL
> implementations in JB that use tinyalsa, such as device/samsung/tuna/audio
> and device/asus/grouper/audio. When JB-MR1 is open-sourced [I don't have
> the date],
> there will updated audio HALs there.
>
> On Thursday, November 8, 2012 5:42:21 AM UTC-8, ffxx68 wrote:
>>
>> Hi
>>
>> I'm trying to port a ICS implementation of ALSA audio to JB, or a tablet
>> device, under this project:
>>
>> Mainly, I have the following to integrate (which I have the patch for
>> ICS):
>>
>> external/alsa-lib
>> hardware/alsa_sound
>>
>> plus some other smaller fix around, but I want to understand first of all
>> what to do with these two first.
>>
>> For example, I have the some files with the same names in both
>> hardware/alsa_sound and hardware/libhardware_legacy/
>> audio (from AOSP), but their content is very different in the two
>> locations.
>>
>> If I keep the ones from hardware/alsa_sound, build fails.
>> If I copy them from hardware/libhardware_legacy/audio to
>> hardware/alsa_sound, I can build but I get a crash during boot.
>>
>> Which one should I keep and compile?
>> Once compiled, which libraries should I use from alsa_sound or
>> libhardware_legacy/audio?
>>
>> Basically, I don't know the approach to follow, with the ALSA
>> integration. I couldn't find any guide, or tutorial, so any help in that
>> sense is welcome too.
>>
>> Thanks in advance
>> Fabio
>>
>
--
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting