static int btcvsd_band_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol);
struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt);
ucontrol->value.integer.value[0] = bt->band;
static int btcvsd_band_set(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol);
struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt);
struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
static int btcvsd_loopback_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol);
struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt);
bool lpbk_en = bt->tx->state == BT_SCO_STATE_LOOPBACK;
static int btcvsd_loopback_set(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol);
struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt);
if (ucontrol->value.integer.value[0]) {
static int btcvsd_tx_mute_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol);
struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt);
if (!bt->tx) {
static int btcvsd_tx_mute_set(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol);
struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt);
if (!bt->tx)
static int btcvsd_rx_irq_received_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol);
struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt);
if (!bt->rx)
static int btcvsd_rx_timeout_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol);
struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt);
if (!bt->rx)
static int btcvsd_rx_timestamp_get(struct snd_kcontrol *kcontrol,
unsigned int __user *data, unsigned int size)
{
- struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol);
struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt);
int ret = 0;
struct mtk_btcvsd_snd_time_buffer_info time_buffer_info_rx;
static int btcvsd_tx_irq_received_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol);
struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt);
if (!bt->tx)
static int btcvsd_tx_timeout_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol);
struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt);
ucontrol->value.integer.value[0] = bt->tx->timeout;
static int btcvsd_tx_timestamp_get(struct snd_kcontrol *kcontrol,
unsigned int __user *data, unsigned int size)
{
- struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
+ struct snd_soc_component *cmpnt = snd_kcontrol_chip(kcontrol);
struct mtk_btcvsd_snd *bt = snd_soc_component_get_drvdata(cmpnt);
int ret = 0;
struct mtk_btcvsd_snd_time_buffer_info time_buffer_info_tx;