Пример #1
0
static int __init zylonite_init(void)
{
	int ret;

	if (!machine_is_zylonite())
		return -ENODEV;
	register_codec(&codec_client);
	set_codec_sub_state(codec_client, CODEC_SUB_POWER_ON);

	pxa_ac97_dai[0].probe = NULL;
	pxa_ac97_dai[0].remove = NULL;
	pxa_ac97_dai[0].suspend = NULL;
	pxa_ac97_dai[0].resume = NULL;
	soc_codec_dev_wm9713.suspend = NULL;
	soc_codec_dev_wm9713.resume = NULL;
	soc_codec_dev_wm9713.remove = NULL;

	zylonite_snd_device = platform_device_alloc("soc-audio", -1);
	if (!zylonite_snd_device)
		return -ENOMEM;

	platform_set_drvdata(zylonite_snd_device, &zylonite_snd_devdata);
	zylonite_snd_devdata.dev = &zylonite_snd_device->dev;
	ret = platform_device_add(zylonite_snd_device);

	if (ret)
		platform_device_put(zylonite_snd_device);

#ifdef CONFIG_PXA3xx_DVFM
	dvfm_register("Sound", &dvfm_dev_idx);
#endif

	return ret;
}
Пример #2
0
WS_DLL_PUBLIC_NOEXTERN void register_codec_module(void)
{
  register_codec("g723", codec_g7231_init, codec_g7231_release, codec_g7231_decode);
  register_codec("g729", codec_g729a_init, codec_g729a_release, codec_g729a_decode);
  register_codec("g722", codec_g722_init, codec_g722_release, codec_g722_decode);
}
Пример #3
0
G_MODULE_EXPORT void register_codec_module(void)
{
  register_codec("g723", codec_g7231_init, codec_g7231_release, codec_g7231_decode);
  register_codec("g729", codec_g729a_init, codec_g729a_release, codec_g729a_decode);
  register_codec("g722", codec_g722_init, codec_g722_release, codec_g722_decode);
}
Пример #4
0
 *
 * @note: This method can be static.
 */
static boost::shared_ptr<bob::io::base::File> make_file (const char* path, char mode) {

  bob::io::base::TensorFile::openmode _mode;
  if (mode == 'r') _mode = bob::io::base::TensorFile::in;
  else if (mode == 'w') _mode = bob::io::base::TensorFile::out;
  else if (mode == 'a') _mode = bob::io::base::TensorFile::append;
  else throw std::runtime_error("unsupported tensor file opening mode");

  return boost::make_shared<TensorArrayFile>(path, _mode);

}

/**
 * Takes care of codec registration per se.
 */
static bool register_codec() {

  boost::shared_ptr<bob::io::base::CodecRegistry> instance =
    bob::io::base::CodecRegistry::instance();

  instance->registerExtension(".tensor", "torch3vision v2.1 tensor files", &make_file);

  return true;

}

static bool codec_registered = register_codec();