Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753299AbcDRLU1 (ORCPT ); Mon, 18 Apr 2016 07:20:27 -0400 Received: from regular1.263xmail.com ([211.150.99.138]:52751 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752612AbcDRLUZ (ORCPT ); Mon, 18 Apr 2016 07:20:25 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-KSVirus-check: 0 X-RL-SENDER: zhengxing@rock-chips.com X-FST-TO: linux-rockchip@lists.infradead.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: zhengxing@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Xing Zheng To: linux-rockchip@lists.infradead.org Cc: heiko@sntech.de, Adam.Thomson@diasemi.com, sugar.zhang@rock-chips.com, jay.xu@rock-chips.com, broonie@kernel.org, dianders@chromium.org, Xing Zheng , Jaroslav Kysela , devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Arnaud Pouliquen , Mengdong Lin , Aaro Koskinen , Support Opensource , linux-kernel@vger.kernel.org, Kumar Gala , Ian Campbell , Takashi Iwai , Liam Girdwood , Pawel Moll , Rob Herring , Jun Nie , Mark Rutland , Andrew Lunn , Jyri Sarha Subject: [PATCH v2 0/3] Add support simple-card parse jack detection via external codec Date: Mon, 18 Apr 2016 19:20:00 +0800 Message-Id: <1460978403-4754-1-git-send-email-zhengxing@rock-chips.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1150 Lines: 34 Hi, In most cases, many codecs already supports jack detection, previouslly, we need to create a customized machine driver every time. In my opinion, the codec fill the detect_jack explicitly and tell sound framework it supports the jack detection, the simple-card is able to parse the dts file and call the export function to initialize the jace detection via the codec. I think that it will bring better flexibility. Thanks. Changes in v1: - clean up the commit message and notes Xing Zheng (3): ASoC: jack: Add an export of a function that calls the codec jack detection ASoC: simple-card: Add support call the codec jack detection after parse dts ASoC: da7219: Add detect_jack callback in the snd_soc_codec_driver .../devicetree/bindings/sound/simple-card.txt | 17 +++ include/sound/soc.h | 7 ++ sound/soc/codecs/da7219.c | 2 + sound/soc/generic/simple-card.c | 126 +++++++++++++++++++- sound/soc/soc-jack.c | 17 +++ 5 files changed, 166 insertions(+), 3 deletions(-) -- 1.7.9.5