Added a new IOCTL for controlling whether the digital audio is routed out of
the DAP2 (CPCAP CODEC) or DAP4 (Bluetooth SCO).
Change-Id: Ib48a5c1ce66992b653addd854e51e5d3dc69ee31
Signed-off-by: Iliyan Malchev <malchev@google.com>
struct cpcap_audio_state *state;
int speaker_gpio;
int headset_gpio;
+ void (*bluetooth_bypass)(bool);
};
int cpcap_audio_init(struct cpcap_audio_state *state, const char *regulator);
pr_info("%s: setting input rate to %dHz\n", __func__, rate);
tegra_setup_audio_in_rate(rate);
break;
+ case CPCAP_AUDIO_SET_BLUETOOTH_BYPASS:
+ if (pdata->bluetooth_bypass)
+ pdata->bluetooth_bypass((bool)arg);
+ else
+ pr_err("%s: no bluetooth bypass handler\n", __func__);
+ break;
}
done:
#define CPCAP_AUDIO_IN_GET_RATE _IOR(CPCAP_AUDIO_MAGIC, 10, unsigned int *)
#define CPCAP_AUDIO_IN_SET_RATE _IOW(CPCAP_AUDIO_MAGIC, 11, unsigned int *)
+#define CPCAP_AUDIO_SET_BLUETOOTH_BYPASS _IOW(CPCAP_AUDIO_MAGIC, 12, unsigned int)
+
#endif/*_CPCAP_AUDIO_H*/