/* * Driver for generic Bluetooth SCO link * Copyright 2011 Lars-Peter Clausen * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * */ #include #include #include #include static const struct snd_soc_dapm_widget bt_sco_widgets[] = { SND_SOC_DAPM_INPUT("RX"), SND_SOC_DAPM_OUTPUT("TX"), }; static const struct snd_soc_dapm_route bt_sco_routes[] = { { "Capture", NULL, "RX" }, { "TX", NULL, "Playback" }, }; static struct snd_soc_dai_driver bt_sco_dai[] = { { .name = "bt-sco-pcm", .playback = { .stream_name = "Playback", .channels_min = 1, .channels_max = 1, .rates = SNDRV_PCM_RATE_8000, .formats = SNDRV_PCM_FMTBIT_S16_LE, }, .capture = { .stream_name = "Capture", .channels_min = 1, .channels_max = 1, .rates = SNDRV_PCM_RATE_8000, .formats = SNDRV_PCM_FMTBIT_S16_LE, }, }, { .name = "bt-sco-pcm-wb", .playback = { .stream_name = "Playback", .channels_min = 1, .channels_max = 1, .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000, .formats = SNDRV_PCM_FMTBIT_S16_LE, }, .capture = { .stream_name = "Capture", .channels_min = 1, .channels_max = 1, .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000, .formats = SNDRV_PCM_FMTBIT_S16_LE, }, } }; static struct snd_soc_codec_driver soc_codec_dev_bt_sco = { .component_driver = { .dapm_widgets = bt_sco_widgets, .num_dapm_widgets = ARRAY_SIZE(bt_sco_widgets), .dapm_routes = bt_sco_routes, .num_dapm_routes = ARRAY_SIZE(bt_sco_routes), }, }; static int bt_sco_probe(struct platform_device *pdev) { return snd_soc_register_codec(&pdev->dev, &soc_codec_dev_bt_sco, bt_sco_dai, ARRAY_SIZE(bt_sco_dai)); } static int bt_sco_remove(struct platform_device *pdev) { snd_soc_unregister_codec(&pdev->dev); return 0; } static const struct platform_device_id bt_sco_driver_ids[] = { { .name = "dfbmcs320", }, { .name = "bt-sco", }, {}, }; MODULE_DEVICE_TABLE(platform, bt_sco_driver_ids); #if defined(CONFIG_OF) static const struct of_device_id bt_sco_codec_of_match[] = { { .compatible = "delta,dfbmcs320", }, { .compatible = "linux,bt-sco", }, {}, }; MODULE_DEVICE_TABLE(of, bt_sco_codec_of_match); #endif static struct platform_driver bt_sco_driver = { .driver = { .name = "bt-sco", .of_match_table = of_match_ptr(bt_sco_codec_of_match), }, .probe = bt_sco_probe, .remove = bt_sco_remove, .id_table = bt_sco_driver_ids, }; module_platform_driver(bt_sco_driver); MODULE_AUTHOR("Lars-Peter Clausen "); MODULE_DESCRIPTION("ASoC generic bluetooth sco link driver"); MODULE_LICENSE("GPL"); c69dbd7544ab2cd585ccf48f360a4'/>
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2017-01-31 22:54:54 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-01 14:20:20 -0500
commit62e13097c46c69dbd7544ab2cd585ccf48f360a4 (patch)
treed66ae203ddc68ae0ca919224e541992e29e1bd68 /drivers
parent974c3f19acebaa40e391c69056ccf851e40a9c0c (diff)
net: phy: broadcom: rehook BCM54612E specific init
This extra BCM54612E code in PHY driver isn't really aneg specific. Even without it aneg works OK but the problem is no packets pass through PHY. Moreover putting this code inside config_aneg callback didn't allow resuming PHY correctly. When driver called phy_stop and phy_start it was putting PHY machine into RESUMING state. After that machine was switching into AN and NOLINK without ever calling phy_start_aneg. This prevented this extra setup from being called and PHY didn't work. This change has been verified to fix network on BCM47186B0 SoC device with BCM54612E. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')