Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d43b66b authored by Laxminath Kasam's avatar Laxminath Kasam
Browse files

ASoC: apr: add API to read subsys state



As audio DSP can be running in lpass or modem
based on chipset, add API to get the subsys state
from apr_v2(lpass) and apr_v3(modem) accordingly.

Change-Id: I7a2b6f12574edcc5f609ce8ddf684a840f86d676
Signed-off-by: default avatarLaxminath Kasam <lkasam@codeaurora.org>
parent f549d0d1
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -21,6 +21,11 @@

static const char *lpass_subsys_name = "adsp";

enum apr_subsys_state apr_get_subsys_state(void)
{
	return apr_get_q6_state();
}

void apr_set_subsys_state(void)
{
	apr_set_q6_state(APR_SUBSYS_DOWN);
+6 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -21,6 +21,11 @@

#define DEST_ID APR_DEST_MODEM

enum apr_subsys_state apr_get_subsys_state(void)
{
	return apr_get_modem_state();
}

void apr_set_subsys_state(void)
{
	apr_set_modem_state(APR_SUBSYS_DOWN);
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2010-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2010-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -168,6 +168,7 @@ uint16_t apr_get_data_src(struct apr_hdr *hdr);
void change_q6_state(int state);
void q6audio_dsp_not_responding(void);
void apr_reset(void *handle);
enum apr_subsys_state apr_get_subsys_state(void);
enum apr_subsys_state apr_get_modem_state(void);
void apr_set_modem_state(enum apr_subsys_state state);
enum apr_subsys_state apr_get_q6_state(void);