soc.h (e3c51ca8fa4a0f3f13ba9be80bee2708cd723934) | soc.h (d191bd8de8c61619563f2b19f1fdcc0944ff1a72) |
---|---|
1/* 2 * linux/sound/soc.h -- ALSA SoC Layer 3 * 4 * Author: Liam Girdwood 5 * Created: Aug 11th 2005 6 * Copyright: Wolfson Microelectronics. PLC. 7 * 8 * This program is free software; you can redistribute it and/or modify --- 355 unchanged lines hidden (view full) --- 364 365int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id, 366 int source, unsigned int freq, int dir); 367int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source, 368 unsigned int freq_in, unsigned int freq_out); 369 370int snd_soc_register_card(struct snd_soc_card *card); 371int snd_soc_unregister_card(struct snd_soc_card *card); | 1/* 2 * linux/sound/soc.h -- ALSA SoC Layer 3 * 4 * Author: Liam Girdwood 5 * Created: Aug 11th 2005 6 * Copyright: Wolfson Microelectronics. PLC. 7 * 8 * This program is free software; you can redistribute it and/or modify --- 355 unchanged lines hidden (view full) --- 364 365int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id, 366 int source, unsigned int freq, int dir); 367int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source, 368 unsigned int freq_in, unsigned int freq_out); 369 370int snd_soc_register_card(struct snd_soc_card *card); 371int snd_soc_unregister_card(struct snd_soc_card *card); |
372int devm_snd_soc_register_card(struct device *dev, struct snd_soc_card *card); | |
373int snd_soc_suspend(struct device *dev); 374int snd_soc_resume(struct device *dev); 375int snd_soc_poweroff(struct device *dev); 376int snd_soc_register_platform(struct device *dev, 377 const struct snd_soc_platform_driver *platform_drv); 378void snd_soc_unregister_platform(struct device *dev); 379int snd_soc_add_platform(struct device *dev, struct snd_soc_platform *platform, 380 const struct snd_soc_platform_driver *platform_drv); 381void snd_soc_remove_platform(struct snd_soc_platform *platform); 382struct snd_soc_platform *snd_soc_lookup_platform(struct device *dev); 383int snd_soc_register_codec(struct device *dev, 384 const struct snd_soc_codec_driver *codec_drv, 385 struct snd_soc_dai_driver *dai_drv, int num_dai); 386void snd_soc_unregister_codec(struct device *dev); 387int snd_soc_register_component(struct device *dev, 388 const struct snd_soc_component_driver *cmpnt_drv, 389 struct snd_soc_dai_driver *dai_drv, int num_dai); | 372int snd_soc_suspend(struct device *dev); 373int snd_soc_resume(struct device *dev); 374int snd_soc_poweroff(struct device *dev); 375int snd_soc_register_platform(struct device *dev, 376 const struct snd_soc_platform_driver *platform_drv); 377void snd_soc_unregister_platform(struct device *dev); 378int snd_soc_add_platform(struct device *dev, struct snd_soc_platform *platform, 379 const struct snd_soc_platform_driver *platform_drv); 380void snd_soc_remove_platform(struct snd_soc_platform *platform); 381struct snd_soc_platform *snd_soc_lookup_platform(struct device *dev); 382int snd_soc_register_codec(struct device *dev, 383 const struct snd_soc_codec_driver *codec_drv, 384 struct snd_soc_dai_driver *dai_drv, int num_dai); 385void snd_soc_unregister_codec(struct device *dev); 386int snd_soc_register_component(struct device *dev, 387 const struct snd_soc_component_driver *cmpnt_drv, 388 struct snd_soc_dai_driver *dai_drv, int num_dai); |
390int devm_snd_soc_register_component(struct device *dev, 391 const struct snd_soc_component_driver *cmpnt_drv, 392 struct snd_soc_dai_driver *dai_drv, int num_dai); | |
393void snd_soc_unregister_component(struct device *dev); 394int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, 395 unsigned int reg); 396int snd_soc_codec_readable_register(struct snd_soc_codec *codec, 397 unsigned int reg); 398int snd_soc_codec_writable_register(struct snd_soc_codec *codec, 399 unsigned int reg); 400int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, --- 268 unchanged lines hidden (view full) --- 669 int (*exit)(struct snd_soc_codec *codec); 670 int (*read)(struct snd_soc_codec *codec, unsigned int reg, 671 unsigned int *value); 672 int (*write)(struct snd_soc_codec *codec, unsigned int reg, 673 unsigned int value); 674 int (*sync)(struct snd_soc_codec *codec); 675}; 676 | 389void snd_soc_unregister_component(struct device *dev); 390int snd_soc_codec_volatile_register(struct snd_soc_codec *codec, 391 unsigned int reg); 392int snd_soc_codec_readable_register(struct snd_soc_codec *codec, 393 unsigned int reg); 394int snd_soc_codec_writable_register(struct snd_soc_codec *codec, 395 unsigned int reg); 396int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, --- 268 unchanged lines hidden (view full) --- 665 int (*exit)(struct snd_soc_codec *codec); 666 int (*read)(struct snd_soc_codec *codec, unsigned int reg, 667 unsigned int *value); 668 int (*write)(struct snd_soc_codec *codec, unsigned int reg, 669 unsigned int value); 670 int (*sync)(struct snd_soc_codec *codec); 671}; 672 |
673/* component interface */ 674struct snd_soc_component_driver { 675 const char *name; 676}; 677 678struct snd_soc_component { 679 const char *name; 680 int id; 681 int num_dai; 682 struct device *dev; 683 struct list_head list; 684 685 const struct snd_soc_component_driver *driver; 686}; 687 |
|
677/* SoC Audio Codec device */ 678struct snd_soc_codec { 679 const char *name; 680 const char *name_prefix; 681 int id; 682 struct device *dev; 683 const struct snd_soc_codec_driver *driver; 684 --- 29 unchanged lines hidden (view full) --- 714 int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); 715 int (*bulk_write_raw)(struct snd_soc_codec *, unsigned int, const void *, size_t); 716 void *reg_cache; 717 const void *reg_def_copy; 718 const struct snd_soc_cache_ops *cache_ops; 719 struct mutex cache_rw_mutex; 720 int val_bytes; 721 | 688/* SoC Audio Codec device */ 689struct snd_soc_codec { 690 const char *name; 691 const char *name_prefix; 692 int id; 693 struct device *dev; 694 const struct snd_soc_codec_driver *driver; 695 --- 29 unchanged lines hidden (view full) --- 725 int (*write)(struct snd_soc_codec *, unsigned int, unsigned int); 726 int (*bulk_write_raw)(struct snd_soc_codec *, unsigned int, const void *, size_t); 727 void *reg_cache; 728 const void *reg_def_copy; 729 const struct snd_soc_cache_ops *cache_ops; 730 struct mutex cache_rw_mutex; 731 int val_bytes; 732 |
733 /* component */ 734 struct snd_soc_component component; 735 |
|
722 /* dapm */ 723 struct snd_soc_dapm_context dapm; 724 unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ 725 726#ifdef CONFIG_DEBUG_FS 727 struct dentry *debugfs_codec_root; 728 struct dentry *debugfs_reg; 729#endif 730}; 731 732/* codec driver */ 733struct snd_soc_codec_driver { 734 735 /* driver ops */ 736 int (*probe)(struct snd_soc_codec *); 737 int (*remove)(struct snd_soc_codec *); 738 int (*suspend)(struct snd_soc_codec *); 739 int (*resume)(struct snd_soc_codec *); | 736 /* dapm */ 737 struct snd_soc_dapm_context dapm; 738 unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */ 739 740#ifdef CONFIG_DEBUG_FS 741 struct dentry *debugfs_codec_root; 742 struct dentry *debugfs_reg; 743#endif 744}; 745 746/* codec driver */ 747struct snd_soc_codec_driver { 748 749 /* driver ops */ 750 int (*probe)(struct snd_soc_codec *); 751 int (*remove)(struct snd_soc_codec *); 752 int (*suspend)(struct snd_soc_codec *); 753 int (*resume)(struct snd_soc_codec *); |
754 struct snd_soc_component_driver component_driver; |
|
740 741 /* Default control and setup, added after probe() is run */ 742 const struct snd_kcontrol_new *controls; 743 int num_controls; 744 const struct snd_soc_dapm_widget *dapm_widgets; 745 int num_dapm_widgets; 746 const struct snd_soc_dapm_route *dapm_routes; 747 int num_dapm_routes; --- 100 unchanged lines hidden (view full) --- 848 849 struct snd_soc_dapm_context dapm; 850 851#ifdef CONFIG_DEBUG_FS 852 struct dentry *debugfs_platform_root; 853#endif 854}; 855 | 755 756 /* Default control and setup, added after probe() is run */ 757 const struct snd_kcontrol_new *controls; 758 int num_controls; 759 const struct snd_soc_dapm_widget *dapm_widgets; 760 int num_dapm_widgets; 761 const struct snd_soc_dapm_route *dapm_routes; 762 int num_dapm_routes; --- 100 unchanged lines hidden (view full) --- 863 864 struct snd_soc_dapm_context dapm; 865 866#ifdef CONFIG_DEBUG_FS 867 struct dentry *debugfs_platform_root; 868#endif 869}; 870 |
856struct snd_soc_component_driver { 857 const char *name; 858}; 859 860struct snd_soc_component { 861 const char *name; 862 int id; 863 int num_dai; 864 struct device *dev; 865 struct list_head list; 866 867 const struct snd_soc_component_driver *driver; 868}; 869 | |
870struct snd_soc_dai_link { 871 /* config - must be set by machine driver */ 872 const char *name; /* Codec name */ 873 const char *stream_name; /* Stream name */ 874 /* 875 * You MAY specify the link's CPU-side device, either by device name, 876 * or by DT/OF node, but not both. If this information is omitted, 877 * the CPU-side DAI is matched using .cpu_dai_name only, which hence --- 340 unchanged lines hidden --- | 871struct snd_soc_dai_link { 872 /* config - must be set by machine driver */ 873 const char *name; /* Codec name */ 874 const char *stream_name; /* Stream name */ 875 /* 876 * You MAY specify the link's CPU-side device, either by device name, 877 * or by DT/OF node, but not both. If this information is omitted, 878 * the CPU-side DAI is matched using .cpu_dai_name only, which hence --- 340 unchanged lines hidden --- |