mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
ASoC: Final updates for v3.16
A few more updates from the last week of development, nothing too exciting. Highlights include: - GPIO descriptor support for jacks - More updates and fixes to the Freescale SSI, Intel and rsnd drivers. - New drivers for Analog Devices ADAU1361, ADAU1381, ADAU1761 and ADAU1781, and Realtek RT5677. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJTjZkHAAoJELSic+t+oim9pl0P/RTeNipwuUbFUWSYMcARc2wE Zpw+imtqjgE91ix5QR4OcQtL6+JtoOF7wfXA8dUmXRLrBqgSGDT/OJh771Jq4J7X LNTd7And4INeELeV7yajsDnHKD8P0V5Dmn+94HrjBgDuseELFn1izdGjM+0GpfKo i/C+595PtLSx3ekdYmsrXWyxgkUOrArhimiYKQzOtjncsGfXJCyhzvusXZQb3tCl Fa/HMTgMH8DlRInruN87s5CFr3O4seDB7LYOmjUIsPj4lorEFbqaGOUtPOCDJN1h tqMVuSIfbAEHX/ny9chsEYtMzOMPWk8s9TWn3LNfHkG8embkzaCaJqg8b8WIk/0U scqcKptarASYAGpSMu8IoSruC4+7GKtpo8zpGGJBclAMgmpXBSa381QnsiUGGocq BoBIjNSXzft3eRB0wjhGPLmJ5qMdHSEKuaDaACf2cot63ePF764cdg9EBItJLWEt G8nHQErUm4UfJapLvrDC+ItSNMLeaSJvCXrM1DPdfObqryKzJDbST/4B7m+w1ZGe 2Cnc536hkYdZ6kFdDgtIyK5yTeAgoxHzYNMndejt4bjkK7bnCIxa49tZV9d8LsTG g03cCEkkE4nCHWsSL891YBKfLLujTZoIY+f5M396FhLHBXL5krCtPRWE42I/xo58 wXH46Sd7HqDXxom5jpP+ =iPCP -----END PGP SIGNATURE----- Merge tag 'asoc-v3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Final updates for v3.16 A few more updates from the last week of development, nothing too exciting. Highlights include: - GPIO descriptor support for jacks - More updates and fixes to the Freescale SSI, Intel and rsnd drivers. - New drivers for Analog Devices ADAU1361, ADAU1381, ADAU1761 and ADAU1781, and Realtek RT5677.
This commit is contained in:
commit
8743dcd663
94 changed files with 9610 additions and 904 deletions
30
include/sound/omap-pcm.h
Normal file
30
include/sound/omap-pcm.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* omap-pcm.h - OMAP PCM driver
|
||||
*
|
||||
* Copyright (C) 2014 Texas Instruments, Inc.
|
||||
*
|
||||
* Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __OMAP_PCM_H__
|
||||
#define __OMAP_PCM_H__
|
||||
|
||||
#if IS_ENABLED(CONFIG_SND_OMAP_SOC)
|
||||
int omap_pcm_platform_register(struct device *dev);
|
||||
#else
|
||||
static inline int omap_pcm_platform_register(struct device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_SND_OMAP_SOC */
|
||||
|
||||
#endif /* __OMAP_PCM_H__ */
|
||||
21
include/sound/rt5677.h
Normal file
21
include/sound/rt5677.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* linux/sound/rt5677.h -- Platform data for RT5677
|
||||
*
|
||||
* Copyright 2013 Realtek Semiconductor Corp.
|
||||
* Author: Oder Chiou <oder_chiou@realtek.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_SND_RT5677_H
|
||||
#define __LINUX_SND_RT5677_H
|
||||
|
||||
struct rt5677_platform_data {
|
||||
/* IN1 IN2 can optionally be differential */
|
||||
bool in1_diff;
|
||||
bool in2_diff;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -452,6 +452,9 @@ int snd_soc_jack_get_type(struct snd_soc_jack *jack, int micbias_voltage);
|
|||
#ifdef CONFIG_GPIOLIB
|
||||
int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
|
||||
struct snd_soc_jack_gpio *gpios);
|
||||
int snd_soc_jack_add_gpiods(struct device *gpiod_dev,
|
||||
struct snd_soc_jack *jack,
|
||||
int count, struct snd_soc_jack_gpio *gpios);
|
||||
void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
|
||||
struct snd_soc_jack_gpio *gpios);
|
||||
#else
|
||||
|
|
@ -461,6 +464,14 @@ static inline int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline int snd_soc_jack_add_gpiods(struct device *gpiod_dev,
|
||||
struct snd_soc_jack *jack,
|
||||
int count,
|
||||
struct snd_soc_jack_gpio *gpios)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
|
||||
struct snd_soc_jack_gpio *gpios)
|
||||
{
|
||||
|
|
@ -587,8 +598,12 @@ struct snd_soc_jack_zone {
|
|||
/**
|
||||
* struct snd_soc_jack_gpio - Describes a gpio pin for jack detection
|
||||
*
|
||||
* @gpio: gpio number
|
||||
* @name: gpio name
|
||||
* @gpio: legacy gpio number
|
||||
* @idx: gpio descriptor index within the function of the GPIO
|
||||
* consumer device
|
||||
* @gpiod_dev GPIO consumer device
|
||||
* @name: gpio name. Also as connection ID for the GPIO consumer
|
||||
* device function name lookup
|
||||
* @report: value to report when jack detected
|
||||
* @invert: report presence in low state
|
||||
* @debouce_time: debouce time in ms
|
||||
|
|
@ -599,6 +614,8 @@ struct snd_soc_jack_zone {
|
|||
*/
|
||||
struct snd_soc_jack_gpio {
|
||||
unsigned int gpio;
|
||||
unsigned int idx;
|
||||
struct device *gpiod_dev;
|
||||
const char *name;
|
||||
int report;
|
||||
int invert;
|
||||
|
|
@ -607,6 +624,7 @@ struct snd_soc_jack_gpio {
|
|||
|
||||
struct snd_soc_jack *jack;
|
||||
struct delayed_work work;
|
||||
struct gpio_desc *desc;
|
||||
|
||||
void *data;
|
||||
int (*jack_status_check)(void *data);
|
||||
|
|
@ -1146,6 +1164,33 @@ static inline struct snd_soc_platform *snd_soc_component_to_platform(
|
|||
return container_of(component, struct snd_soc_platform, component);
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_soc_dapm_to_codec() - Casts a DAPM context to the CODEC it is embedded in
|
||||
* @dapm: The DAPM context to cast to the CODEC
|
||||
*
|
||||
* This function must only be used on DAPM contexts that are known to be part of
|
||||
* a CODEC (e.g. in a CODEC driver). Otherwise the behavior is undefined.
|
||||
*/
|
||||
static inline struct snd_soc_codec *snd_soc_dapm_to_codec(
|
||||
struct snd_soc_dapm_context *dapm)
|
||||
{
|
||||
return container_of(dapm, struct snd_soc_codec, dapm);
|
||||
}
|
||||
|
||||
/**
|
||||
* snd_soc_dapm_to_platform() - Casts a DAPM context to the platform it is
|
||||
* embedded in
|
||||
* @dapm: The DAPM context to cast to the platform.
|
||||
*
|
||||
* This function must only be used on DAPM contexts that are known to be part of
|
||||
* a platform (e.g. in a platform driver). Otherwise the behavior is undefined.
|
||||
*/
|
||||
static inline struct snd_soc_platform *snd_soc_dapm_to_platform(
|
||||
struct snd_soc_dapm_context *dapm)
|
||||
{
|
||||
return container_of(dapm, struct snd_soc_platform, dapm);
|
||||
}
|
||||
|
||||
/* codec IO */
|
||||
unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg);
|
||||
int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg,
|
||||
|
|
|
|||
Loading…
Reference in a new issue