The Audio chipet is a Realtek ALC 5621 and this is what I can find in my
kernel driver:
static const char *in_sw_control_texts[] = {
"OFF", "MIC_normal", "MIC_ringtone", "MIC_incall", "Headset_normal",
"Headset_ringtone", "Headset_incall"
};
static const char *fs_sw_control_texts[] = {
"7.35kHz", "8kHz", "11.025kHz", "12kHz", "14.7kHz", "16kHz",
"22.05kHz", "24kHz", "29.4kHz", "32kHz", "44.1kHz", "48kHz"
};
static const char *out_sw_control_texts[] = {
"OFF", "Speaker_normal", "Speaker_ringtone", "Speaker_incall",
"Earpiece_ringtone", "Earpiece_incall", "Headset_normal",
"Headset_ringtone", "Headset_incall"
};
but I'm not really sure how to use these controls, in audio/audio_hw.c or
audio/audio_route.c code...
On Monday, 28 January 2013 11:59:52 UTC+1, ffxx68 wrote:
>
> I'm now pretty sure I made a mistake when I thought I solved: I simply
> used a different Android file system (of which I don't have source... of
> course).
> So I really need some guidance here?
> Someone who could help me in fixing my tinyalsa implementation?
> What should I check first?
> How should I adapt the mixer_paths.xml to my device?
> thanks!
>
> On Saturday, 26 January 2013 12:31:06 UTC+1, ffxx68 wrote:
>>
>> ...Well, I'm not really sure I've solved... I probably simply used the
>> deafult ausio library in one of my builds. Possibile? After using the
>> latest build I can't have any sound out of my device.
>>
>> I'm a bit confused now. Here's something I've collected, after my latest
>> build:
>>
>> $ adb logcat | grep -i audio
>> I/AudioFlinger( 75): Using module 1 has the primary audio interface
>> I/AudioFlinger( 75): AudioFlinger's thread 0x2a00d020 ready to run
>> E/AudioFlinger( 75): int android::load_audio_interface(char const*,
>> audio_hw_device_t**) couldn't load audio hw module audio.a2dp (No such file
>> or directory)
>> I/AudioFlinger( 75): loadHwModule() error -2 loading module a2dp
>> W/AudioPolicyManagerBase( 75): could not open HW module a2dp
>> I/AudioFlinger( 75): loadHwModule() Loaded usb audio interface from USB
>> audio HW HAL (audio) handle 3
>> I/AudioPolicyService( 75): Loaded audio policy from LEGACY Audio Policy
>> HAL (audio_policy)
>> E/SoundPool( 248): error loading /system/media/audio/ui/Lock.ogg
>> E/SoundPool( 248): error loading /system/media/audio/ui/Unlock.ogg
>> I/SystemServer( 248): Audio Service
>> I/AudioService( 248): Remote Control registerMediaButtonIntent() for
>> PendingIntent{411609b0: PendingIntentRecord{41160910 android
>> broadcastIntent}}
>> W/WiredAccessoryObserver( 248): This kernel does not have usb audio
>> support
>> W/WiredAccessoryObserver( 248): This kernel does not have HDMI audio
>> support
>> E/SoundPool( 248): error loading /system/media/audio/ui/Effect_Tick.ogg
>> W/AudioService( 248): Soundpool could not load file:
>> /system/media/audio/ui/Effect_Tick.ogg
>> E/SoundPool( 248): error loading /system/media/audio/ui/Effect_Tick.ogg
>> W/AudioService( 248): Soundpool could not load file:
>> /system/media/audio/ui/Effect_Tick.ogg
>> E/SoundPool( 248): error loading /system/media/audio/ui/Effect_Tick.ogg
>> W/AudioService( 248): Soundpool could not load file:
>> /system/media/audio/ui/Effect_Tick.ogg
>> E/SoundPool( 248): error loading /system/media/audio/ui/Effect_Tick.ogg
>> W/AudioService( 248): Soundpool could not load file:
>> /system/media/audio/ui/Effect_Tick.ogg
>> E/SoundPool( 248): error loading /system/media/audio/ui/Effect_Tick.ogg
>> W/AudioService( 248): Soundpool could not load file:
>> /system/media/audio/ui/Effect_Tick.ogg
>> E/SoundPool( 248): error loading
>> /system/media/audio/ui/KeypressStandard.ogg
>> W/AudioService( 248): Soundpool could not load file:
>> /system/media/audio/ui/KeypressStandard.ogg
>> E/SoundPool( 248): error loading
>> /system/media/audio/ui/KeypressSpacebar.ogg
>> W/AudioService( 248): Soundpool could not load file:
>> /system/media/audio/ui/KeypressSpacebar.ogg
>> E/SoundPool( 248): error loading
>> /system/media/audio/ui/KeypressDelete.ogg
>> W/AudioService( 248): Soundpool could not load file:
>> /system/media/audio/ui/KeypressDelete.ogg
>> E/SoundPool( 248): error loading
>> /system/media/audio/ui/KeypressReturn.ogg
>> W/AudioService( 248): Soundpool could not load file:
>> /system/media/audio/ui/KeypressReturn.ogg
>> W/AudioService( 248): loadSoundEffects(), Error -1 while loading samples
>> I/AudioService( 248): Remote Control registerMediaButtonIntent() for
>> PendingIntent{411a6af8: PendingIntentRecord{4113db38 com.android.music
>> broadcastIntent}}
>> I/AudioService( 248): AudioFocus abandonAudioFocus() from
>> android.media.AudioManager@40fcc528com.android.music.MediaPlaybackService$3@40fdb838
>> V/MusicFXControlPanelReceiver( 661): Action:
>> android.media.action.CLOSE_AUDIO_EFFECT_CONTROL_SESSION
>> V/MusicFXControlPanelReceiver( 661): Audio session: 5
>> I/AudioService( 248): Remote Control registerMediaButtonIntent() for
>> PendingIntent{41235d68: PendingIntentRecord{4113db38 com.android.music
>> broadcastIntent}}
>> V/MusicFXControlPanelReceiver( 661): Action:
>> android.media.action.CLOSE_AUDIO_EFFECT_CONTROL_SESSION
>> V/MusicFXControlPanelReceiver( 661): Audio session: 6
>> I/AudioService( 248): AudioFocus abandonAudioFocus() from
>> android.media.AudioManager@41064868com.android.music.MediaPlaybackService$3@410644f8
>>
>>
>> $ adb shell dumpsys audio
>>
>> Audio Focus stack entries:
>>
>> Remote Control stack entries:
>> pi: PendingIntent{411609b0: PendingIntentRecord{41160910 android
>> broadcastIntent}} -- ercvr:
>> ComponentInfo{com.android.music/com.android.music.MediaButtonIntentReceiver}
>>
>> -- client: null -- uid: -1 -- type: 0 state: 1
>> pi: PendingIntent{411a6af8: PendingIntentRecord{4113db38
>> com.android.music broadcastIntent}} -- ercvr:
>> ComponentInfo{com.android.music/com.android.music.MediaButtonIntentReceiver}
>>
>> -- client: null -- uid: -1 -- type: 0 state: 1
>>
>> Remote Control Client stack entries:
>> uid: -1 -- id: 1 -- type: 0 -- state: 1 -- vol handling: 1 -- vol:
>> 15 -- volMax: 15 -- volObs: null
>> uid: -1 -- id: 2 -- type: 0 -- state: 1 -- vol handling: 1 -- vol:
>> 15 -- volMax: 15 -- volObs: null
>>
>> Remote Volume State:
>> has remote: false
>> is remote active: false
>> rccId: -1
>> volume handling: PLAYBACK_VOLUME_VARIABLE(1)
>> volume: 15
>> volume steps: 15
>>
>> Stream volumes (device: index)
>> - STREAM_VOICE_CALL:
>> Current: 8000: 4,
>> Last audible: 8000: 4,
>> - STREAM_SYSTEM:
>> Current: 8000: 5, 2: 6,
>> Last audible: 8000: 5, 2: 6,
>> - STREAM_RING:
>> Current: 8000: 5, 2: 6,
>> Last audible: 8000: 5, 2: 6,
>> - STREAM_MUSIC:
>> Current: 8000: 11,
>> Last audible: 8000: 11,
>> - STREAM_ALARM:
>> Current: 8000: 6,
>> Last audible: 8000: 6,
>> - STREAM_NOTIFICATION:
>> Current: 8000: 5, 2: 6,
>> Last audible: 8000: 5, 2: 6,
>> - STREAM_BLUETOOTH_SCO:
>> Current: 8000: 7,
>> Last audible: 8000: 7,
>> - STREAM_SYSTEM_ENFORCED:
>> Current: 8000: 5, 2: 6,
>> Last audible: 8000: 5, 2: 6,
>> - STREAM_DTMF:
>> Current: 8000: 11, 2: 13,
>> Last audible: 8000: 5, 2: 13,
>> - STREAM_TTS:
>> Current: 8000: 11,
>> Last audible: 8000: 11,
>>
>> Audio routes:
>> mMainType=0x0
>> mBluetoothName=null
>>
>>
>> On Friday, 25 January 2013 18:10:24 UTC+1, ffxx68 wrote:
>>>
>>> Ok. I think I solved. Thanks again for the suggestions!
>>> I just compiled the audio/ as is (adapting only my .mk files), and it
>>> goes just fine on my device:
>>>
>>> https://github.com/Renesas-EMEV2/Renesas-device_emev/commit/70ca2d4f00c58374982a78ea86a2997fe7b15200
>>> I thought I had to change mixer control names, etc, but looks like
>>> that's not necessary...
>>>
>>>
>>> On Friday, 25 January 2013 17:21:21 UTC+1, ffxx68 wrote:
>>>>
>>>> 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
---
You received this message because you are subscribed to the Google Groups
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.