Exemple #1
0
void __init msm_snddev_init(void)
{
	if (machine_is_msm7x30_ffa() || machine_is_qsd8x55_ffa()) {
		platform_add_devices(snd_devices_ffa,
		ARRAY_SIZE(snd_devices_ffa));

#ifdef CONFIG_DEBUG_FS
		debugfs_hsed_config = debugfs_create_file("msm_hsed_config",
					S_IFREG | S_IRUGO, NULL,
		(void *) "msm_hsed_config", &snddev_hsed_config_debug_fops);
#endif
	} else if (machine_is_msm7x30_surf() || machine_is_qsd8x55_surf())
		platform_add_devices(snd_devices_surf,
		ARRAY_SIZE(snd_devices_surf));
	else
		platform_add_devices(snd_devices_fluid,
		ARRAY_SIZE(snd_devices_fluid));
}
static int __devinit hs_rpc_init(void)
{
	int rc;

	if (machine_is_msm7x27_surf() || machine_is_msm7x27_ffa() ||
		machine_is_qsd8x50_surf() || machine_is_qsd8x50_ffa() ||
		machine_is_msm7x30_surf() || machine_is_msm7x30_ffa()) {
		rc = hs_rpc_cb_init();
		if (rc)
			pr_err("%s: failed to initialize\n", __func__);
	}

	rc = msm_rpc_create_server(&hs_rpc_server);
	if (rc < 0)
		pr_err("%s: failed to create rpc server\n", __func__);

	return 0;
}
void __ref msm_snddev_init_timpani(void)
{
#ifndef CONFIG_HUAWEI_KERNEL
	platform_add_devices(snd_devices_ffa,
			ARRAY_SIZE(snd_devices_ffa));
#ifdef CONFIG_DEBUG_FS
	debugfs_hsed_config = debugfs_create_file("msm_hsed_config",
				S_IFREG | S_IWUGO, NULL,
		(void *) "msm_hsed_config", &snddev_hsed_config_debug_fops);
	if (!debugfs_hsed_config)
		pr_err("failed to create msm_head_config debug fs entry\n");
#endif
#else  //#ifndef CONFIG_HUAWEI_KERNEL
    if (machine_is_msm7x30_ffa() || machine_is_msm8x55_ffa() ||
    		machine_is_msm8x55_svlte_ffa()) {
    		platform_add_devices(snd_devices_ffa,
		ARRAY_SIZE(snd_devices_ffa));
#ifdef CONFIG_DEBUG_FS
        debugfs_hsed_config = debugfs_create_file("msm_hsed_config",
        			S_IFREG | S_IWUGO, NULL,
    	(void *) "msm_hsed_config", &snddev_hsed_config_debug_fops);
        if (!debugfs_hsed_config)
        	pr_err("failed to create msm_head_config debug fs entry\n");	
#endif        
    }else if( machine_is_msm8255_u8860() 
	        || machine_is_msm8255_u8860lp() 
            || machine_is_msm8255_u8860_92()
            || machine_is_msm8255_u8680()
            || machine_is_msm8255_u8860_51()
			|| machine_is_msm8255_u8730())
    {
        platform_add_devices(snd_devices_u8860, ARRAY_SIZE(snd_devices_u8860));
    }else if (machine_is_msm8255_c8860())
    {
        platform_add_devices(snd_devices_c8860, arraysize_c8860);
    }
    else
    {
        platform_add_devices(snd_devices_u8860, ARRAY_SIZE(snd_devices_u8860));
    }
#endif  //#ifndef CONFIG_HUAWEI_KERNEL

}